Ticket #22090: 22090.3.diff
File 22090.3.diff, 1.5 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/schema.php
926 926 } 927 927 $wpdb->query( "INSERT INTO $wpdb->sitemeta ( site_id, meta_key, meta_value ) VALUES " . $insert ); 928 928 929 $current_site = new stdClass; 930 $current_site->domain = $domain; 931 $current_site->path = $path; 932 $current_site->site_name = ucfirst( $domain ); 933 934 if ( !is_multisite() ) { 929 if ( ! is_multisite() ) { 930 $current_site = new stdClass; 931 $current_site->domain = $domain; 932 $current_site->path = $path; 933 $current_site->site_name = ucfirst( $domain ); 935 934 $wpdb->insert( $wpdb->blogs, array( 'site_id' => $network_id, 'domain' => $domain, 'path' => $path, 'registered' => current_time( 'mysql' ) ) ); 936 $ blog_id = $wpdb->insert_id;935 $current_site->blog_id = $blog_id = $wpdb->insert_id; 937 936 update_user_meta( $site_user->ID, 'source_domain', $domain ); 938 937 update_user_meta( $site_user->ID, 'primary_blog', $blog_id ); 939 }940 938 941 if ( $subdomain_install )942 $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );943 else944 $wp_rewrite->set_permalink_structure( '/blog/%year%/%monthnum%/%day%/%postname%/' );939 if ( $subdomain_install ) 940 $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 941 else 942 $wp_rewrite->set_permalink_structure( '/blog/%year%/%monthnum%/%day%/%postname%/' ); 945 943 946 flush_rewrite_rules(); 944 flush_rewrite_rules(); 945 } 947 946 948 947 if ( $subdomain_install ) { 949 948 $vhost_ok = false;