Skip to:
Content

BuddyPress.org

Changeset 4203 for trunk/bp-loader.php


Ignore:
Timestamp:
04/14/2011 01:36:19 PM (15 years ago)
Author:
boonebgorges
Message:

Keeps bp-default from loading during MS upgrade process. Fixes #3015. Refactors parts of the upgrade wizard to make MS upgrades recognize previous installations of BP. Refactors parts of the upgrade wizard to use bp-active-components rather than the deprecated bp-deactivated-components. Ensures that MS upgrades are seen as upgrades rather than new installations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-loader.php

    r4030 r4203  
    5757
    5858// Test to see whether this is a new installation or an upgraded version of BuddyPress
    59 if ( !$bp->database_version = get_site_option( 'bp-db-version' ) )
    60     $bp->database_version = get_site_option( 'bp-core-db-version' );  // BP 1.2 option name
     59if ( !$bp->database_version = get_site_option( 'bp-db-version' ) ) {
     60    if ( $bp->database_version = get_option( 'bp-db-version' ) ) {
     61        $bp->is_ms_activate = 1;
     62    } else {
     63        $bp->database_version = get_site_option( 'bp-core-db-version' );  // BP 1.2 option
     64    }
     65}
    6166
    6267// This is a new installation.
     
    7176
    7277    // Check if an update is required
    73     if ( (int)$bp->database_version < (int)constant( 'BP_DB_VERSION' ) ) {
     78    if ( (int)$bp->database_version < (int)constant( 'BP_DB_VERSION' ) || isset( $bp->is_ms_activate ) ) {
    7479        $bp->maintenence_mode = 'update';
    7580        require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' );
Note: See TracChangeset for help on using the changeset viewer.