Changeset 672

Show
Ignore:
Timestamp:
12/31/03 23:51:41 (5 years ago)
Author:
saxmatt
Message:

Installation cleanup.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/install-config.php

    r664 r672  
    124124                fwrite($handle, str_replace("localhost", $dbhost, $line)); 
    125125                break; 
    126             case '$table_prefix  ': 
     126            case '$table_prefix  =': 
    127127                fwrite($handle, str_replace('wp_', $prefix, $line)); 
    128128                break; 
  • trunk/wp-admin/install.php

    r664 r672  
    657657<form action="install.php?step=3" method="post"> 
    658658<input type="hidden" name="step" value="3" /> 
    659 <p>What is the url for your blog? <input name="url" type="text" size="60" /> 
    660 , now on to <input type="submit" value="Step 3" ></p> 
     659<p>What is the URL for your blog?<br /> 
     660<?php 
     661$guessurl = str_replace('/wp-admin/install.php?step=2', '', 'http://' . $HTTP_HOST . $REQUEST_URI); 
     662?> 
     663  <input name="url" type="text" size="60" value="<?php echo $guessurl; ?>" /> 
     664</p> 
     665<p>On to  
     666    <input type="submit" value="Step 3..." /> 
     667</p> 
    661668</form> 
    662669 
  • trunk/wp-admin/upgrade-functions.php

    r664 r672  
    456456 
    457457function upgrade_100() { 
    458     global $wpdb, $tableposts, $tablecomments, $tablecategories, $tableoptionvalues, $tableoptiongroups, $tableoptiongroup_options, $tableoptions, $tablepost2cat
     458    global $wpdb, $tableposts, $tablecomments, $tablecategories, $tableoptionvalues, $tableoptiongroups, $tableoptiongroup_options, $tableoptions, $tablepost2cat, $tablelinks, $tableusers
    459459    maybe_add_column($tableposts, 'post_name', "ALTER TABLE `$tableposts` ADD `post_name` VARCHAR(200) NOT NULL"); 
    460460    maybe_add_column($tableposts, 'to_ping', "ALTER TABLE $tableposts ADD `to_ping` TEXT NOT NULL"); 
     
    465465    maybe_add_column($tablecategories, 'category_description', "ALTER TABLE `$tablecategories` ADD `category_description` TEXT NOT NULL"); 
    466466    maybe_add_column($tablecategories, 'category_parent', "ALTER TABLE `$tablecategories` ADD `category_parent` INT(4) NOT NULL"); 
     467    maybe_add_column($tablelinks, 'link_rss', "ALTER TABLE `$tablelinks` ADD `link_rss` VARCHAR( 255 ) NOT NULL;"); 
     468    maybe_add_column($tableusers, 'user_description', "ALTER TABLE `$tableusers` ADD `user_description` TEXT NOT NULL"); 
    467469 
    468470    // Create indicies 
  • trunk/wp-includes/functions.php

    r652 r672  
    542542 
    543543function get_settings($setting) { 
    544     global $wpdb, $cache_settings, $use_cache; 
     544    global $wpdb, $cache_settings, $use_cache, $REQUEST_URI; 
     545    if (strstr($REQUEST_URI, 'install.php')) return false; 
    545546    if ((empty($cache_settings)) OR (!$use_cache)) { 
    546547        $settings = get_alloptions(); 
  • trunk/wp-settings.php

    r650 r672  
    1818$tableoptiongroups        = $table_prefix . 'optiongroups'; 
    1919$tableoptiongroup_options = $table_prefix . 'optiongroup_options'; 
     20define('WPINC', 'wp-includes'); 
     21require (ABSPATH . WPINC . '/wp-db.php'); 
     22 
     23$wpdb->hide_errors(); 
     24if (!$wpdb->get_row("SELECT * FROM $tableoptions LIMIT 1") && !strstr($REQUEST_URI, 'install.php')) { 
     25    die("It doesn't look like you've installed WP yet. Try running <a href='wp-admin/install.php'>install.php</a>."); 
     26} 
     27$wpdb->show_errors(); 
    2028 
    2129// This is the name of the include directory. No "/" allowed. 
    22 define('WPINC', 'wp-includes'); 
    2330 
     31require (ABSPATH . WPINC . '/functions.php'); 
    2432require (ABSPATH . 'wp-config-extra.php'); 
    25 require (ABSPATH . WPINC . '/wp-db.php'); 
    26 require (ABSPATH . WPINC . '/functions.php'); 
    2733require (ABSPATH . WPINC . '/template-functions.php'); 
    2834require (ABSPATH . WPINC . '/class-xmlrpc.php'); 
     
    3642// get_settings() wherever these are needed OR 
    3743// accessing a single global $all_settings var 
    38 if (!isset($_wp_installing) || !$_wp_installing) { 
     44if (!strstr($REQUEST_URI, 'install.php')) { 
    3945    $siteurl = get_settings('siteurl'); 
    4046    // "When trying to design a foolproof system,  
     
    99105} //end !$_wp_installing 
    100106 
     107 
     108 
    101109require (ABSPATH . WPINC . '/vars.php'); 
    102110?>