WordPress.org

Make WordPress Core

Changeset 13341


Ignore:
Timestamp:
02/23/2010 08:38:41 PM (10 years ago)
Author:
nacin
Message:

Fall back to $wpdb::blogid, not main blog id, in wpdb->tables(). See #11644

File:
1 edited

Legend:

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

    r13337 r13341  
    630630     * @param bool $prefix Whether to include table prefixes. Default true. If blog
    631631     *  prefix is requested, then the custom users and usermeta tables will be mapped.
    632      * @param int $blog_id The blog_id to prefix. Defaults to main blog. Used only when prefix is requested.
     632     * @param int $blog_id The blog_id to prefix. Defaults to wpdb::blogid. Used only when prefix is requested.
    633633     * @return array Table names. When a prefix is requested, the key is the unprefixed table name.
    634634     */
     
    657657
    658658        if ( $prefix ) {
     659            if ( ! $blog_id )
     660                $blog_id = $this->blogid;
    659661            $prefix = $this->get_blog_prefix( $blog_id );
    660662            $base_prefix = $this->base_prefix;
Note: See TracChangeset for help on using the changeset viewer.