WordPress.org

Make WordPress Core

Changeset 13121


Ignore:
Timestamp:
02/13/2010 07:57:43 PM (10 years ago)
Author:
nacin
Message:

Add is_multisite() check to wpdb::get_blog_prefix() to fix get_blog_prefix($blog_id) call on a non-MS install. See #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r12939 r13121  
    490490
    491491    function get_blog_prefix( $blog_id = '' ) {
    492         if ( $blog_id ) {
    493                         if( defined('MULTISITE') && ( $blog_id == 0 || $blog_id == 1) ) {
    494                     return $this->base_prefix;
    495                         } else {
    496                     return $this->base_prefix . $blog_id . '_';
    497                         }
     492        if ( is_multisite() && $blog_id ) {
     493            if ( defined('MULTISITE') && ( $blog_id == 0 || $blog_id == 1 ) )
     494                return $this->base_prefix;
     495            else
     496                return $this->base_prefix . $blog_id . '_';
    498497        } else {
    499498            return $this->base_prefix;
Note: See TracChangeset for help on using the changeset viewer.