mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
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.
|
||||
* @return string Blog prefix.
|
||||
*/
|
||||
function get_blog_prefix( $blog_id = 0 ) {
|
||||
if ( is_multisite() && $blog_id ) {
|
||||
function get_blog_prefix( $blog_id = -1 ) {
|
||||
if ( is_multisite() ) {
|
||||
if ( $blog_id < 0 )
|
||||
$blog_id = $this->blogid;
|
||||
if ( defined( 'MULTISITE' ) && ( 0 == $blog_id || 1 == $blog_id ) )
|
||||
return $this->base_prefix;
|
||||
else
|
||||
@ -1577,4 +1579,4 @@ if ( ! isset($wpdb) ) {
|
||||
*/
|
||||
$wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user