Skip to content

Instantly share code, notes, and snippets.

@stas
Created July 10, 2011 12:48
Show Gist options
  • Select an option

  • Save stas/1074515 to your computer and use it in GitHub Desktop.

Select an option

Save stas/1074515 to your computer and use it in GitHub Desktop.
diff --git a/bp-core/admin/bp-core-admin.php b/bp-core/admin/bp-core-admin.php
index 4061f84..16ed27c 100644
--- bp-core/admin/bp-core-admin.php
+++ bp-core/admin/bp-core-admin.php
@@ -170,7 +170,10 @@ function bp_core_admin_component_setup_handler() {
// Settings form submitted, now save the settings. First, set active components
if ( isset( $_POST['bp_components'] ) ) {
+ require_once( BP_PLUGIN_DIR . '/bp-core/admin/bp-core-update.php' );
+ // Save settings and upgrade schema
$bp->active_components = stripslashes_deep( $_POST['bp_components'] );
+ bp_core_install( $bp->active_components );
bp_update_option( 'bp-active-components', $bp->active_components );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment