Changeset 1277

Show
Ignore:
Timestamp:
05/08/08 10:02:44 (3 months ago)
Author:
donncha
Message:

Record the site_name, fixes #619
Change generic "My new WordPress? MU Site"

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/index-install.php

    r1226 r1277  
    233233 
    234234function printstep1form( $dbname = 'wordpress', $uname = 'username', $pwd = 'password', $dbhost = 'localhost', $vhost = 'yes', $prefix = 'wp_' ) { 
    235         $weblog_title = 'My new WordPress MU Site'; 
     235        $weblog_title = ucfirst( $_SERVER[ 'HTTP_HOST' ] ) . ' Blogs'; 
    236236        $email = ''; 
    237237        $hostname = $_SERVER[ 'HTTP_HOST' ]; 
     
    367367        if( $email == '' ) 
    368368                die( 'You must enter an email address!' ); 
    369         $weblog_title = stripslashes( $_POST[ 'weblog_title' ] ); 
    370369 
    371370        // set up site tables 
     371        $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'site_name', '" . $wpdb->escape( $_POST[ 'weblog_title' ] ) . "')" ); 
    372372        $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_email', '".$email."')" ); 
    373373        $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_user_id', '1')" ); 
     
    397397--The Team @ SITE_NAME')" ); 
    398398        $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'first_post', 'Welcome to <a href=\"SITE_URL\">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' )" ); 
     399 
     400        $weblog_title = stripslashes( $_POST[ 'weblog_title' ] ); 
    399401 
    400402        $pass = substr( md5( rand() ), 5, 12 );