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: http://svn.automattic.com/wordpress/trunk@13121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9316d29c1d
commit
12800b27fa
|
@ -489,12 +489,11 @@ class wpdb {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_blog_prefix( $blog_id = '' ) {
|
function get_blog_prefix( $blog_id = '' ) {
|
||||||
if ( $blog_id ) {
|
if ( is_multisite() && $blog_id ) {
|
||||||
if( defined('MULTISITE') && ( $blog_id == 0 || $blog_id == 1) ) {
|
if ( defined('MULTISITE') && ( $blog_id == 0 || $blog_id == 1 ) )
|
||||||
return $this->base_prefix;
|
return $this->base_prefix;
|
||||||
} else {
|
else
|
||||||
return $this->base_prefix . $blog_id . '_';
|
return $this->base_prefix . $blog_id . '_';
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return $this->base_prefix;
|
return $this->base_prefix;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue