have get_blog_prefix() default to the prefix of the current blog, see #12820
git-svn-id: https://develop.svn.wordpress.org/trunk@13949 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ca8c935b10
commit
3a9d10480d
@ -624,8 +624,10 @@ class wpdb {
|
|||||||
* @param int $blog_id Optional.
|
* @param int $blog_id Optional.
|
||||||
* @return string Blog prefix.
|
* @return string Blog prefix.
|
||||||
*/
|
*/
|
||||||
function get_blog_prefix( $blog_id = 0 ) {
|
function get_blog_prefix( $blog_id = -1 ) {
|
||||||
if ( is_multisite() && $blog_id ) {
|
if ( is_multisite() ) {
|
||||||
|
if ( $blog_id < 0 )
|
||||||
|
$blog_id = $this->blogid;
|
||||||
if ( defined( 'MULTISITE' ) && ( 0 == $blog_id || 1 == $blog_id ) )
|
if ( defined( 'MULTISITE' ) && ( 0 == $blog_id || 1 == $blog_id ) )
|
||||||
return $this->base_prefix;
|
return $this->base_prefix;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user