summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.php2
-rw-r--r--wp-inst/wp-settings.php6
2 files changed, 5 insertions, 3 deletions
diff --git a/index.php b/index.php
index 5beb7a7..7701faf 100644
--- a/index.php
+++ b/index.php
@@ -328,8 +328,6 @@ function step3() {
$wpdb->query( $query );
$query = "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (2, 1, 'admin_user_id', '1')";
$wpdb->query( $query );
- $query = "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (3, 1, 'siteurl', '$domain' )";
- $wpdb->query( $query );
$wpdb->query( "INSERT INTO ".$wpdb->site." ( id, domain, path ) VALUES ( '', '$domain', '$base' )" );
$res = createBlog( $domain, $base, 'admin', $weblog_title, $email );
diff --git a/wp-inst/wp-settings.php b/wp-inst/wp-settings.php
index fb45454..a9b8784 100644
--- a/wp-inst/wp-settings.php
+++ b/wp-inst/wp-settings.php
@@ -52,10 +52,14 @@ if( substr( $domain, 0, 4 ) == 'www.' )
$domain = substr( $domain, 4 );
$current_blog = $wpdb->get_row("SELECT * FROM $wpdb->blogs WHERE domain = '$domain' AND path = '$base'");
-
$blog_id = $current_blog->blog_id;
$is_public = $current_blog->is_public;
$site_id = $current_blog->site_id;
+
+$current_site = $wpdb->get_row("SELECT * FROM $wpdb->site WHERE id='$site_id'");
+if( $current_site->domain == $domain && $current_site->path == $base ) {
+ $wpblog = 'main';
+}
if( $blog_id == false ) {
// no blog found, are we installing? Check if the table exists.
if ( defined('WP_INSTALLING') ) {