Use the wpdb method instead of $wpdb->prefix.

props hakre.
fixes #16756.


git-svn-id: https://develop.svn.wordpress.org/trunk@25615 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2013-09-24 23:40:41 +00:00
parent a580e9f3c3
commit f7050daeba
3 changed files with 12 additions and 11 deletions

View File

@@ -498,7 +498,7 @@ function switch_to_blog( $new_blog, $deprecated = null ) {
}
$wpdb->set_blog_id( $new_blog );
$GLOBALS['table_prefix'] = $wpdb->prefix;
$GLOBALS['table_prefix'] = $wpdb->get_blog_prefix();
$prev_blog_id = $GLOBALS['blog_id'];
$GLOBALS['blog_id'] = $new_blog;
@@ -561,7 +561,7 @@ function restore_current_blog() {
$wpdb->set_blog_id( $blog );
$prev_blog_id = $GLOBALS['blog_id'];
$GLOBALS['blog_id'] = $blog;
$GLOBALS['table_prefix'] = $wpdb->prefix;
$GLOBALS['table_prefix'] = $wpdb->get_blog_prefix();
if ( function_exists( 'wp_cache_switch_to_blog' ) ) {
wp_cache_switch_to_blog( $blog );