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:
nacin 2010-02-13 19:57:43 +00:00
parent 9316d29c1d
commit 12800b27fa

View File

@ -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;
}