Make WordPress Core

Changeset 5844


Ignore:
Timestamp:
08/03/2007 01:08:59 AM (17 years ago)
Author:
markjaquith
Message:

More streamlined install process. Obeys WP_SITEURL if defined. fixes #4687 (props JeremyVisser, Nazgul), see #4685

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/install.php

    r5825 r5844  
    3333switch($step) {
    3434    case 0:
     35    case 1: // in case people are directly linking to this
    3536?>
    36 <p><?php printf(__('Welcome to WordPress installation. We&#8217;re now going to go through a few steps to get you up and running with the latest in personal publishing platforms. You may want to peruse the <a href="%s">ReadMe documentation</a> at your leisure.'), '../readme.html'); ?></p>
    37 <h2 class="step"><a href="install.php?step=1"><?php _e('First Step &raquo;'); ?></a></h2>
    38 <?php
    39         break;
    40     case 1:
    41 ?>
    42 <h1><?php _e('First Step'); ?></h1>
    43 <p><?php _e("Before we begin we need a little bit of information. Don't worry, you can always change these later."); ?></p>
     37<h1>Welcome</h1>
     38<p><?php printf(__('Welcome to the famous five minute WordPress installation process! You may want to browse the <a href="%s">ReadMe documentation</a> at your leisure.  Otherwise, just fill in the information below and you\'ll be on your way to using the most extendable and powerful personal publishing platform in the world.'), '../readme.html'); ?></p>
     39<!--<h2 class="step"><a href="install.php?step=1"><?php _e('First Step &raquo;'); ?></a></h2>-->
     40
     41<h1><?php _e('Information needed'); ?></h1>
     42<p><?php _e("Please provide the following information.  Don't worry, you can always change these settings later."); ?></p>
    4443
    4544<form id="setup" method="post" action="install.php?step=2">
     
    5554        <tr>
    5655            <th scope="row"  valign="top"> <?php __('Privacy:'); ?></th>
    57             <td><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('I would like my blog to appear in search engines like Google and Technorati.'); ?></label></td>
     56            <td><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td>
    5857        </tr>
    5958    </table>
    60     <p><em><?php _e('Double-check that email address before continuing.'); ?></em></p>
    61     <h2 class="step"><input type="submit" name="Submit" value="<?php _e('Continue to Second Step &raquo;'); ?>" /></h2>
     59    <p><em><?php _e('Double-check your email address before continuing.'); ?></em></p>
     60    <h2 class="step"><input type="submit" name="Submit" value="<?php _e('Install WordPress &raquo;'); ?>" /></h2>
    6261</form>
    6362
     
    7170        // check e-mail address
    7271        if (empty($admin_email)) {
    73             die(__("<strong>ERROR</strong>: please type your e-mail address"));
     72            // TODO: poka-yoke
     73            die(__("<strong>ERROR</strong>: you must provide an e-mail address"));
    7474        } else if (!is_email($admin_email)) {
    75             die(__("<strong>ERROR</strong>: the e-mail address isn't correct"));
     75            // TODO: poka-yoke
     76            die(__('<strong>ERROR</strong>: that isn\'t a valid e-mail address.  E-mail addresses look like: <code>username@example.com</code>'));
    7677        }
    7778
    78 ?>
    79 <h1><?php _e('Second Step'); ?></h1>
    80 <p><?php _e('Now we&#8217;re going to create the database tables and fill them with some default data.'); ?></p>
    81 
    82 
    83 <?php
    8479    $result = wp_install($weblog_title, 'admin', $admin_email, $public);
    8580    extract($result, EXTR_SKIP);
    8681?>
    8782
    88 <p><em><?php _e('Finished!'); ?></em></p>
     83<h1><?php _e('Success!'); ?></h1>
    8984
    90 <p><?php printf(__('Now you can <a href="%1$s">log in</a> with the <strong>username</strong> "<code>admin</code>" and <strong>password</strong> "<code>%2$s</code>".'), '../wp-login.php', $password); ?></p>
    91 <p><?php _e('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you. If you lose it, you will have to delete the tables from the database yourself, and re-install WordPress. So to review:'); ?></p>
     85<p><?php printf(__('WordPress has been installed.  Now you can <a href="%1$s">log in</a> with the <strong>username</strong> "<code>admin</code>" and <strong>password</strong> "<code>%2$s</code>".'), '../wp-login.php', $password); ?></p>
     86<p><?php _e('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.'); ?></p>
    9287
    9388<dl>
     
    9994        <dd><a href="../wp-login.php">wp-login.php</a></dd>
    10095</dl>
    101 <p><?php _e('Were you expecting more steps? Sorry to disappoint. All done! :)'); ?></p>
     96<p><?php _e('Were you expecting more steps? Sorry to disappoint. :)'); ?></p>
    10297
    10398<?php
  • trunk/wp-settings.php

    r5820 r5844  
    143143
    144144if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) {
    145     if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
    146         $link = 'install.php';
     145    if ( defined('WP_SITEURL') )
     146        $link = WP_SITEURL . '/wp-admin/install.php';
     147    elseif (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
     148        $link = preg_replace('|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
    147149    else
    148         $link = 'wp-admin/install.php';
    149 
    150     wp_die( sprintf( 'It doesn&#8217;t look like you&#8217;ve installed WP yet. Try running <a href="%s">install.php</a>.', $link ) );
     150        $link = preg_replace('|/[^/]+?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
     151    require_once(ABSPATH . WPINC . '/kses.php');
     152    require_once(ABSPATH . WPINC . '/pluggable.php');
     153    wp_redirect($link);
     154    die(); // have to die here ~ Mark
    151155}
    152156
Note: See TracChangeset for help on using the changeset viewer.