fix multisite object cache warnings, $table_prefix assignment, See #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@12730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
933e511518
commit
432087e89e
|
@ -308,7 +308,7 @@ function switch_to_blog( $new_blog ) {
|
|||
if ( is_object( $current_user ) )
|
||||
$current_user->_init_caps();
|
||||
|
||||
if ( is_object( $wp_object_cache ) )
|
||||
if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) )
|
||||
$global_groups = $wp_object_cache->global_groups;
|
||||
else
|
||||
$global_groups = false;
|
||||
|
@ -361,7 +361,7 @@ function restore_current_blog() {
|
|||
if ( is_object( $current_user ) )
|
||||
$current_user->_init_caps();
|
||||
|
||||
if ( is_object( $wp_object_cache ) )
|
||||
if ( is_object( $wp_object_cache ) && isset( $wp_object_cache->global_groups ) )
|
||||
$global_groups = $wp_object_cache->global_groups;
|
||||
else
|
||||
$global_groups = false;
|
||||
|
|
|
@ -17,7 +17,7 @@ if( defined( 'SUNRISE' ) )
|
|||
$wpdb->blogid = $current_blog->blog_id;
|
||||
$wpdb->siteid = $current_blog->site_id;
|
||||
$wpdb->set_prefix($table_prefix); // set up blog tables
|
||||
$table_prefix = $table_prefix . $blog_id . '_';
|
||||
$table_prefix = $wpdb->get_blog_prefix();
|
||||
|
||||
// Fix empty PHP_SELF
|
||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||
|
|
Loading…
Reference in New Issue