diff --git src/bp-core/bp-core-update.php src/bp-core/bp-core-update.php
index f1aedda..bb10734 100644
|
|
|
function bp_version_updater() { |
| 206 | 206 | |
| 207 | 207 | require_once( buddypress()->plugin_dir . '/bp-core/admin/bp-core-admin-schema.php' ); |
| 208 | 208 | |
| | 209 | // Used to check if we need to restore the blog |
| | 210 | $needs_reset = false; |
| | 211 | |
| | 212 | if ( is_multisite() && ! bp_is_root_blog() ) { |
| | 213 | $needs_reset = true; |
| | 214 | |
| | 215 | // Make sure the current blog is set to the root blog |
| | 216 | switch_to_blog( bp_get_root_blog_id() ); |
| | 217 | } |
| | 218 | |
| 209 | 219 | // Install BP schema and activate only Activity and XProfile. |
| 210 | 220 | if ( bp_is_install() ) { |
| 211 | 221 | |
| … |
… |
function bp_version_updater() { |
| 272 | 282 | |
| 273 | 283 | // Bump the version. |
| 274 | 284 | bp_version_bump(); |
| | 285 | |
| | 286 | // Restore the current blog if needed |
| | 287 | if ( true === $needs_reset ) { |
| | 288 | restore_current_blog(); |
| | 289 | } |
| 275 | 290 | } |
| 276 | 291 | |
| 277 | 292 | /** |