Index: bp-core/bp-core-loader.php
===================================================================
--- bp-core/bp-core-loader.php	(revision 4525)
+++ bp-core/bp-core-loader.php	(working copy)
@@ -53,35 +53,54 @@

 		/** Components ********************************************************/

-		// Set the included and optional components
-		$bp->optional_components    = apply_filters( 'bp_optional_components',    array( 'activity', 'blogs', 'forums', 'friends', 'groups', 'messages', 'settings', 'xprofile', ) );
+		// Set the included and optional components.
+		$bp->optional_components = array( 'activity', 'forums', 'friends', 'groups', 'messages', 'settings', 'xprofile', );

+		// Blogs component only available for multisite
+		if ( is_multisite() )
+			$bp->optional_components[] = 'blogs';
+
+		$bp->optional_components    = apply_filters( 'bp_optional_components', $bp->optional_components );
+
 		// Set the required components
-		$bp->required_components    = apply_filters( 'bp_required_components',    array( 'members', ) );
+		$bp->required_components    = apply_filters( 'bp_required_components', array( 'members' ) );

 		// Get a list of activated components
 		if ( $active_components = get_site_option( 'bp-active-components' ) ) {
-			$bp->active_components      = apply_filters( 'bp_active_components',      $active_components );
+			$bp->active_components      = apply_filters( 'bp_active_components', $active_components );
 			$bp->deactivated_components = apply_filters( 'bp_deactivated_components', array_values( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_keys( $bp->active_components ) ) ) );

 		// Pre 1.3 Backwards compatibility
 		} elseif ( $deactivated_components = get_site_option( 'bp-deactivated-components' ) ) {
 			// Trim off namespace and filename
-			foreach ( $deactivated_components as $component => $value )
+			foreach ( (array) $deactivated_components as $component => $value )
 				$trimmed[] = str_replace( '.php', '', str_replace( 'bp-', '', $component ) );

 			// Set globals
 			$bp->deactivated_components = apply_filters( 'bp_deactivated_components', $trimmed );

 			// Setup the active components
-			$active_components          = array_flip( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_values( $bp->deactivated_components ) ) );
+			$active_components     = array_flip( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_values( $bp->deactivated_components ) ) );

 			// Loop through active components and set the values
-			foreach( $active_components as $component => $value )
-				$bp->active_components[$component] = 1;
+			$bp->active_components = array_map( '__return_true', $active_components );

 			// Set the active component global
-			$bp->active_components      = apply_filters( 'bp_active_components', $bp->active_components );
+			$bp->active_components = apply_filters( 'bp_active_components', $bp->active_components );
+
+		// Default to all components active
+		} else {
+			// Set globals
+			$bp->deactivated_components = array();
+
+			// Setup the active components
+			$active_components     = array_flip( array_values( array_merge( $bp->optional_components, $bp->required_components ) ) );
+
+			// Loop through active components and set the values
+			$bp->active_components = array_map( '__return_true', $active_components );
+
+			// Set the active component global
+			$bp->active_components = apply_filters( 'bp_active_components', $bp->active_components );
 		}

 		// Loop through optional components
@@ -215,4 +234,4 @@
 // Initialize the BuddyPress Core
 $bp->core = new BP_Core();

-?>
+?>
\ No newline at end of file
Index: bp-core/bp-core-functions.php
===================================================================
--- bp-core/bp-core-functions.php	(revision 4525)
+++ bp-core/bp-core-functions.php	(working copy)
@@ -307,7 +307,7 @@
 		return;

 	// Don't show these messages during setup or upgrade
-	if ( isset( $bp->maintenence_mode ) )
+	if ( isset( $bp->maintenance_mode ) )
 		return;

 	/**
@@ -1107,8 +1107,8 @@

 	do_action( 'bp_do_404', $redirect );

-	$wp_query->set_404();
-	status_header( 404 );
+	$wp_query->set_404();
+	status_header( 404 );
 	nocache_headers();

 	if ( 'remove_canonical_direct' == $redirect )
Index: bp-core/admin/bp-core-update.php
===================================================================
--- bp-core/admin/bp-core-update.php	(revision 4525)
+++ bp-core/admin/bp-core-update.php	(working copy)
@@ -14,22 +14,26 @@
 	}

 	function __construct() {
-		// Look for current DB version
-		if ( !$this->database_version = get_site_option( 'bp-db-version' ) ) {
-			if ( $this->database_version = get_option( 'bp-db-version' ) ) {
-				$this->is_network_activate = true;
-			} else {
-				if ( !$this->current_step() ) {
-					setcookie( 'bp-wizard-step', 0, time() + 60 * 60 * 24, COOKIEPATH );
-					$_COOKIE['bp-wizard-step'] = 0;
-				}
-			}
+		global $bp;
+
+		// Get current DB version
+		$this->database_version = !empty( $bp->database_version ) ? (int) $bp->database_version : 0;
+
+		if ( !empty( $bp->is_network_activate ) ) {
+			$this->is_network_activate = $bp->is_network_activate;
+
+		} elseif ( !$this->current_step() ) {
+			setcookie( 'bp-wizard-step', 0, time() + 60 * 60 * 24, COOKIEPATH );
+			$_COOKIE['bp-wizard-step'] = 0;
 		}

 		$this->new_version  = constant( 'BP_DB_VERSION' );
-		$this->setup_type   = ( empty( $this->database_version ) && !(int)get_site_option( 'bp-core-db-version' ) ) ? 'install' : 'update';
+		$this->setup_type   = !empty( $bp->maintenance_mode ) ? $bp->maintenance_mode : '';
 		$this->current_step = $this->current_step();

+		// Remove the admin menu while we update/install
+		remove_action( bp_core_admin_hook(), 'bp_core_add_admin_menu', 9 );
+
 		// Call the save method that will save data and modify $current_step
 		if ( isset( $_POST['save'] ) )
 			$this->save( $_POST['save'] );
@@ -71,10 +75,10 @@
 			if ( $this->is_network_activate )
 				$steps[] = __( 'Multisite Update', 'buddypress' );

-			if ( $this->database_version < $this->new_version )
+			if ( $this->database_version < (int) $this->new_version )
 				$steps[] = __( 'Database Update', 'buddypress' );

-			if ( $this->database_version < 1225 || !bp_core_get_page_meta() )
+			if ( $this->database_version < 1801 || !bp_core_get_page_meta() )
 				$steps[] = __( 'Pages', 'buddypress' );

 			$steps[] = __( 'Finish', 'buddypress' );
@@ -264,9 +268,9 @@
 			$blogs_slug = 'blogs';

  		// Call up old bp-pages to see if a page has been previously linked to Blogs
-		$page_blog_id 		= is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
-		$existing_pages_data 	= get_blog_option( $page_blog_id, 'bp-pages' );
-		$existing_pages 	= $existing_pages_data[$page_blog_id];
+		$page_blog_id        = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
+		$existing_pages_data = get_blog_option( $page_blog_id, 'bp-pages' );
+		$existing_pages      = $existing_pages_data[$page_blog_id];

 		if ( !empty( $existing_pages['blogs'] ) )
 			$existing_blog_page = '&selected=' . $existing_pages['blogs'];
@@ -718,15 +722,21 @@
 	/** Save Step Methods *****************************************************/

 	function step_db_update_save() {
+		global $bp;
+
 		if ( isset( $_POST['submit'] ) ) {
 			check_admin_referer( 'bpwizard_db_update' );

 			// Run the schema install to update tables
 			bp_core_install();

-			if ( $this->database_version < 1225 )
+			if ( $this->database_version < 1801 )
 				$this->update_1_3();

+			// Update the active components option early if we're updating
+			if ( 'update' == $this->setup_type )
+				update_site_option( 'bp-active-components', $bp->active_components );
+
 			return true;
 		}

@@ -739,14 +749,14 @@
 		if ( isset( $_POST['submit'] ) ) {
 			check_admin_referer( 'bpwizard_ms_update' );

-			if ( !$active_components = get_option( 'bp-active-components' ) )
+			if ( !$active_components = get_site_option( 'bp-active-components' ) )
 				$active_components = array();

 			// Transfer important settings from blog options to site options
 			$options = array(
-				'bp-db-version'		=> $this->database_version,
-				'bp-active-components'	=> $active_components,
-				'avatar-default'	=> get_option( 'avatar-default' )
+				'bp-db-version'        => $this->database_version,
+				'bp-active-components' => $active_components,
+				'avatar-default'       => get_option( 'avatar-default' )
 			);
 			bp_core_activate_site_options( $options );

@@ -758,12 +768,12 @@
 					switch_to_blog( BP_ROOT_BLOG );

 				// Move bp-pages data from the blog options table to site options
-				$page_blog_id 		= is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
-				$existing_pages_data 	= get_blog_option( $page_blog_id, 'bp-pages' );
-				$existing_pages 	= $existing_pages_data[$page_blog_id];
+				$page_blog_id        = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
+				$existing_pages_data = get_blog_option( $page_blog_id, 'bp-pages' );
+				$existing_pages      = $existing_pages_data[$page_blog_id];

-				$bp_pages       	= $this->setup_pages( (array)$_POST['bp_pages'] );
-				$bp_pages       	= array_merge( (array)$existing_pages, (array)$bp_pages );
+				$bp_pages            = $this->setup_pages( (array)$_POST['bp_pages'] );
+				$bp_pages            = array_merge( (array)$existing_pages, (array)$bp_pages );

 				$existing_pages_data[$page_blog_id] = $bp_pages;

@@ -821,9 +831,9 @@
 			foreach ( (array)$existing_pages as $page_id )
 				wp_delete_post( $page_id, true );

-			$blog_pages 	= $this->setup_pages( (array)$_POST['bp_pages'] );
-			$page_blog_id 	= is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
-			$bp_pages	= array( $page_blog_id => $blog_pages );
+			$blog_pages   = $this->setup_pages( (array)$_POST['bp_pages'] );
+			$page_blog_id = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
+			$bp_pages     = array( $page_blog_id => $blog_pages );

 			update_site_option( 'bp-pages', $bp_pages );

@@ -994,7 +1004,7 @@
 			check_admin_referer( 'bpwizard_finish' );

 			// Update the DB version in the database
-			update_site_option( 'bp-db-version', constant( 'BP_DB_VERSION' ) );
+			update_site_option( 'bp-db-version', $this->new_version );
 			delete_site_option( 'bp-core-db-version' );

 			// Delete the setup cookie
@@ -1180,16 +1190,16 @@
  * @uses add_submenu_page() WP function to add a submenu item
  */
 function bp_core_update_add_admin_menu() {
-	global $bp, $bp_wizard;
+	global $bp_wizard;

 	// Only load this version of the menu if this is an upgrade or a new installation
-	if ( empty( $bp->maintenence_mode ) )
+	if ( empty( $bp_wizard->setup_type ) )
 		return false;

 	if ( !current_user_can( 'activate_plugins' ) )
 		return false;

-	if ( '' == get_site_option( 'bp-db-version' ) && !(int)get_site_option( 'bp-core-db-version' ) && !$bp_wizard->is_network_activate )
+	if ( 'install' == $bp_wizard->setup_type )
 		$status = __( 'Setup', 'buddypress' );
 	else
 		$status = __( 'Update', 'buddypress' );
@@ -1256,16 +1266,16 @@

 function bp_core_update_do_network_admin() {
 	$do_network_admin = false;
-
+
 	if ( is_multisite() && ( !defined( 'BP_ENABLE_MULTIBLOG' ) || !BP_ENABLE_MULTIBLOG ) )
 		$do_network_admin = true;
-
+
 	return apply_filters( 'bp_core_do_network_admin', $do_network_admin );
 }

 function bp_core_update_admin_hook() {
 	$hook = bp_core_update_do_network_admin() ? 'network_admin_menu' : 'admin_menu';
-
+
 	return apply_filters( 'bp_core_admin_hook', $hook );
 }

@@ -1277,8 +1287,11 @@
  * @global $pagenow The current admin page
  */
 function bp_core_update_nag() {
-	global $bp, $pagenow;
+	global $bp_wizard, $pagenow;

+	if ( empty( $bp_wizard->setup_type ) )
+		return;
+
 	if ( !is_super_admin() )
 		return;

@@ -1287,7 +1300,7 @@

 	$url = bp_core_update_do_network_admin() ? network_admin_url( 'admin.php?page=bp-wizard' ) : admin_url( 'admin.php?page=bp-wizard' );

-	switch( $bp->maintenence_mode ) {
+	switch( $bp_wizard->setup_type ) {
 		case 'update':
 			$msg = sprintf( __( 'BuddyPress has been updated! Please run the <a href="%s">update wizard</a>.', 'buddypress' ), $url );
 			break;
Index: bp-loader.php
===================================================================
--- bp-loader.php	(revision 4525)
+++ bp-loader.php	(working copy)
@@ -59,7 +59,7 @@
 // Test to see whether this is a new installation or an upgraded version of BuddyPress
 if ( !$bp->database_version = get_site_option( 'bp-db-version' ) ) {
 	if ( $bp->database_version = get_option( 'bp-db-version' ) ) {
-		$bp->is_ms_activate = 1;
+		$bp->is_network_activate = 1;
 	} else {
 		$bp->database_version = get_site_option( 'bp-core-db-version' );  // BP 1.2 option
 	}
@@ -67,7 +67,7 @@

 // This is a new installation.
 if ( empty( $bp->database_version ) ) {
-	$bp->maintenence_mode = 'install';
+	$bp->maintenance_mode = 'install';
 	require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' );

 // There is a previous installation
@@ -76,8 +76,8 @@
 	require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' );

 	// Check if an update is required
-	if ( (int)$bp->database_version < (int)constant( 'BP_DB_VERSION' ) || isset( $bp->is_ms_activate ) ) {
-		$bp->maintenence_mode = 'update';
+	if ( (int)$bp->database_version < (int)constant( 'BP_DB_VERSION' ) || isset( $bp->is_network_activate ) ) {
+		$bp->maintenance_mode = 'update';
 		require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' );
 	}
 }
@@ -86,14 +86,14 @@

 if ( !function_exists( 'bp_loader_activate' ) ) :
 /**
- * Defines BP's activation routine.
- *
- * Most of BP's crucial setup is handled by the setup wizard. This function takes care of some
- * issues with incompatible legacy themes, and provides a hook for other functions to know that
- * BP has been activated.
- *
- * @package BuddyPress Core
-*/
+ * Defines BP's activation routine.
+ *
+ * Most of BP's crucial setup is handled by the setup wizard. This function takes care of some
+ * issues with incompatible legacy themes, and provides a hook for other functions to know that
+ * BP has been activated.
+ *
+ * @package BuddyPress Core
+*/
 function bp_loader_activate() {
 	// Force refresh theme roots.
 	delete_site_transient( 'theme_roots' );
