Skip to:
Content

BuddyPress.org

Changeset 5202


Ignore:
Timestamp:
09/30/2011 08:42:53 PM (15 years ago)
Author:
boonebgorges
Message:

Make sure that page data is pulled from the proper root blog when populating dropdowns and 'automatically create a page' text on Pages step of wizard. Fixes #3639

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-update.php

    r5068 r5202  
    266266
    267267        function step_ms_update() {
     268                global $wpdb;
     269
     270                // Make sure that page info is pulled from bp_get_root_blog_id() (except when in
     271                // multisite mode)
     272                if ( !empty( $wpdb->blogid ) && ( $wpdb->blogid != bp_get_root_blog_id() ) && ( !defined( 'BP_ENABLE_MULTIBLOG' ) ) )
     273                        switch_to_blog( bp_get_root_blog_id() );
     274
    268275                if ( !current_user_can( 'activate_plugins' ) )
    269276                        return false;
     
    337344                </div>
    338345
    339         <?php
     346                <?php
     347
     348                restore_current_blog();
    340349        }
    341350
     
    363372
    364373        function step_pages() {
    365                 global $bp;
     374                global $bp, $wpdb;
     375
     376                // Make sure that page info is pulled from bp_get_root_blog_id() (except when in
     377                // multisite mode)
     378                if ( !empty( $wpdb->blogid ) && ( $wpdb->blogid != bp_get_root_blog_id() ) && ( !defined( 'BP_ENABLE_MULTIBLOG' ) ) )
     379                        switch_to_blog( bp_get_root_blog_id() );
    366380
    367381                if ( !current_user_can( 'activate_plugins' ) )
     
    527541                </div>
    528542
    529         <?php
     543                <?php
     544
     545                restore_current_blog();
    530546        }
    531547
Note: See TracChangeset for help on using the changeset viewer.