have get_blog_prefix() default to the prefix of the current blog, see #12820

git-svn-id: http://svn.automattic.com/wordpress/trunk@13949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
wpmuguru 2010-04-02 22:47:51 +00:00
parent 90db286b69
commit 8f5099a7ea

View File

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