In populate_network(), insert the first site as blog_id 1, overriding any auto-increment DB seed. props wpmuguru, fixes #16568.

Built from https://develop.svn.wordpress.org/trunk@25038


git-svn-id: http://core.svn.wordpress.org/trunk@25025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-08-16 20:08:09 +00:00
parent 1065f55586
commit 19e485ce42

View File

@ -936,7 +936,7 @@ We hope you enjoy your new site. Thanks!
$current_site->domain = $domain;
$current_site->path = $path;
$current_site->site_name = ucfirst( $domain );
$wpdb->insert( $wpdb->blogs, array( 'site_id' => $network_id, 'domain' => $domain, 'path' => $path, 'registered' => current_time( 'mysql' ) ) );
$wpdb->insert( $wpdb->blogs, array( 'site_id' => $network_id, 'blog_id' => 1, 'domain' => $domain, 'path' => $path, 'registered' => current_time( 'mysql' ) ) );
$current_site->blog_id = $blog_id = $wpdb->insert_id;
update_user_meta( $site_user->ID, 'source_domain', $domain );
update_user_meta( $site_user->ID, 'primary_blog', $blog_id );