Add is_multisite() check to wpdb::get_blog_prefix() to fix get_blog_prefix($blog_id) call on a non-MS install. See #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@13121 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a7c3d02452
commit
0210cf3c6e
@ -489,12 +489,11 @@ class wpdb {
|
||||
}
|
||||
|
||||
function get_blog_prefix( $blog_id = '' ) {
|
||||
if ( $blog_id ) {
|
||||
if( defined('MULTISITE') && ( $blog_id == 0 || $blog_id == 1) ) {
|
||||
return $this->base_prefix;
|
||||
} else {
|
||||
return $this->base_prefix . $blog_id . '_';
|
||||
}
|
||||
if ( is_multisite() && $blog_id ) {
|
||||
if ( defined('MULTISITE') && ( $blog_id == 0 || $blog_id == 1 ) )
|
||||
return $this->base_prefix;
|
||||
else
|
||||
return $this->base_prefix . $blog_id . '_';
|
||||
} else {
|
||||
return $this->base_prefix;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user