From b62c95ea0ff25f2644db3ee8ae0540ff57c307e7 Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 19 Jun 2006 16:15:23 +0000 Subject: Install updates git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@572 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- index.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index b314a71..e316dfd 100644 --- a/index.php +++ b/index.php @@ -228,7 +228,7 @@ function printstep1form( $dbname = 'wordpress', $uname = 'username', $pwd = 'pas

Blog Addresses

Please choose whether you would like blogs for the MU install to use sub-domains or sub-directories. You can not change this later. We recommend sub-domains.

-


+


Database

@@ -314,10 +314,14 @@ function step2() { } function printuserdetailsform( $weblog_title = 'My new Blog', $username = '', $email = '' ) { + $hostname = str_replace( "www.", "", $_SERVER[ 'HTTP_HOST' ] ); print "

To finish setting up your blog, please fill in the folling form and click Submit.

+

Server Address

+

+

Blog Details

@@ -343,7 +347,7 @@ function step3() { { $base .= "/"; } - $domain = $_SERVER[ 'HTTP_HOST' ]; + $domain = $wpdb->escape( $_POST[ 'basedomain' ] ); if( substr( $domain, 0, 4 ) == 'www.' ) $domain = substr( $domain, 4 ); @@ -351,10 +355,8 @@ function step3() { $weblog_title = $wpdb->escape( $_POST[ 'weblog_title' ] ); // set up site tables - $query = "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_email', '".$email."')"; - $wpdb->query( $query ); - $query = "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_user_id', '1')"; - $wpdb->query( $query ); + $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_email', '".$email."')" ); + $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_user_id', '1')" ); $wpdb->query( "INSERT INTO ".$wpdb->site." ( id, domain, path ) VALUES ( NULL, '$domain', '$base' )" ); $wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " VALUES (1, 'Uncategorized', 'uncategorized', '')" ); $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'upload_filetypes', 'jpg jpeg png gif mp3 mov avi wmv midi mid pdf' )" ); @@ -383,9 +385,11 @@ We hope you enjoy your new weblog. wpmu_create_blog( $domain, $base, $weblog_title, $user_id, array() ); update_blog_option( 1, 'template', 'home'); update_blog_option( 1, 'stylesheet', 'home'); - $msg = "Your new WPMU site has been created at\nhttp://{$_SERVER[ 'HTTP_HOST' ]}/\n\nLogin details:\nUsername: admin\nPassword: $pass\nLogin: http://{$_SERVER[ 'HTTP_HOST' ]}/wp-login.php\n"; + update_blog_option( 1, 'permalink_structure', '/blog/%year%/%monthnum%/%day%/%postname%/'); + update_blog_option( 1, 'rewrite_rules', ''); + $msg = "Your new WPMU site has been created at\nhttp://$domain/\n\nLogin details:\nUsername: admin\nPassword: $pass\nLogin: http://$domain/wp-login.php\n"; wp_mail( $email, "Your new WPMU site is ready!", $msg, "From: wordpress@" . $_SERVER[ 'HTTP_HOST' ] ); - print "

Congrats! Your blog has been set up and you have been sent details of your login and password in an email.

"; + print "

Congrats! Your WPMU site has been set up and you have been sent details of your login and password in an email.

"; } switch( $_POST[ 'action' ] ) { -- cgit
Weblog Title