Make WordPress Core

Ticket #20825: 20825.diff

File 20825.diff, 672 bytes (added by jeremyfelt, 11 years ago)
  • src/wp-includes/ms-settings.php

     
    115115
    116116        if ( ! $blog_id ) {
    117117                if ( defined( 'WP_INSTALLING' ) ) {
    118                         $current_blog->blog_id = $blog_id = 1;
     118                        // in multisite, the main blog may not be always the first one!!
     119                        $current_blog->blog_id = $blog_id = ( defined('BLOG_ID_CURRENT_SITE') ? BLOG_ID_CURRENT_SITE : 1 ) ;
    119120                } else {
    120121                        wp_load_translations_early();
    121122                        $msg = ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) ? ' ' . __( 'Database tables are missing.' ) : '';