WordPress.org

Make WordPress Core

Ticket #16568: 16568.diff

File 16568.diff, 774 bytes (added by wpmuguru, 3 years ago)

hard code blog id 1

  • wp-admin/includes/schema.php

     
    737737        $current_site->site_name = ucfirst( $domain ); 
    738738 
    739739        if ( !is_multisite() ) { 
    740                 $wpdb->insert( $wpdb->blogs, array( 'site_id' => $network_id, 'domain' => $domain, 'path' => $path, 'registered' => current_time( 'mysql' ) ) ); 
     740                $wpdb->insert( $wpdb->blogs, array( 'site_id' => $network_id, 'blog_id' => 1, 'domain' => $domain, 'path' => $path, 'registered' => current_time( 'mysql' ) ) ); 
    741741                $blog_id = $wpdb->insert_id; 
    742742                update_user_meta( $site_user->ID, 'source_domain', $domain ); 
    743743                update_user_meta( $site_user->ID, 'primary_blog', $blog_id );