Skip to:
Content

BuddyPress.org

Ticket #6892: 6892.05.patch

File 6892.05.patch, 836 bytes (added by DJPaul, 10 years ago)
  • src/bp-core/bp-core-update.php

    diff --git a/src/bp-core/bp-core-update.php b/src/bp-core/bp-core-update.php
    index f1aedda..7fbdd30 100644
    a b function bp_version_updater() { 
    205205        ) );
    206206
    207207        require_once( buddypress()->plugin_dir . '/bp-core/admin/bp-core-admin-schema.php' );
     208        $switched_to_root_blog = false;
     209
     210        // Make sure the current blog is set to the root blog
     211        if ( ! bp_is_root_blog() ) {
     212                switch_to_blog( bp_get_root_blog_id() );
     213                bp_register_taxonomies();
     214
     215                $switched_to_root_blog = true;
     216        }
    208217
    209218        // Install BP schema and activate only Activity and XProfile.
    210219        if ( bp_is_install() ) {
    function bp_version_updater() { 
    272281
    273282        // Bump the version.
    274283        bp_version_bump();
     284
     285        if ( $switched_to_root_blog ) {
     286                restore_current_blog();
     287        }
    275288}
    276289
    277290/**