]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/setup-config.php
Wordpress 2.5.1
[autoinstalls/wordpress.git] / wp-admin / setup-config.php
index b4dae209a9c237912e6c21b7b07794cff54c7b9a..e2c39147f390a256e56c6ab179a0d6a66df1fdc6 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 define('WP_INSTALLING', true);
+//These two defines are required to allow us to use require_wp_db() to load the database class while being wp-content/wp-db.php aware
+define('ABSPATH', dirname(dirname(__FILE__)).'/');
+define('WPINC', 'wp-includes');
 
 require_once('../wp-includes/compat.php');
 require_once('../wp-includes/functions.php');
@@ -10,7 +13,7 @@ if (!file_exists('../wp-config-sample.php'))
 
 $configFile = file('../wp-config-sample.php');
 
-if ( !is_writable('../')) 
+if ( !is_writable('../'))
        wp_die("Sorry, I can't write to the directory. You'll have to either change the permissions on your WordPress directory or create your wp-config.php manually.");
 
 // Check if wp-config.php has been created
@@ -28,60 +31,10 @@ function display_header(){
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<title>WordPress &rsaquo; Setup Configuration File</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<style media="screen" type="text/css">
-       <!--
-       html {
-               background: #eee;
-       }
-       body {
-               background: #fff;
-               color: #000;
-               font-family: Georgia, "Times New Roman", Times, serif;
-               margin-left: 20%;
-               margin-right: 20%;
-               padding: .2em 2em;
-       }
-
-       h1 {
-               color: #006;
-               font-size: 18px;
-               font-weight: lighter;
-       }
-
-       h2 {
-               font-size: 16px;
-       }
-
-       p, li, dt {
-               line-height: 140%;
-               padding-bottom: 2px;
-       }
+<title>WordPress &rsaquo; Setup Configuration File</title>
+<link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install.css" type="text/css" />
 
-       ul, ol {
-               padding: 5px 5px 5px 20px;
-       }
-       #logo {
-               margin-bottom: 2em;
-       }
-       .step a, .step input {
-               font-size: 2em;
-       }
-       td input {
-               font-size: 1.5em;
-       }
-       .step, th {
-               text-align: right;
-       }
-       #footer {
-               text-align: center;
-               border-top: 1px solid #ccc;
-               padding-top: 1em;
-               font-style: italic;
-       }
-       -->
-       </style>
 </head>
 <body>
 <h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
@@ -102,17 +55,18 @@ switch($step) {
        <li>Table prefix (if you want to run more than one WordPress in a single database) </li>
 </ol>
 <p><strong>If for any reason this automatic file creation doesn't work, don't worry. All this does is fill in the database information to a configuration file. You may also simply open <code>wp-config-sample.php</code> in a text editor, fill in your information, and save it as <code>wp-config.php</code>. </strong></p>
-<p>In all likelihood, these items were supplied to you by your ISP. If you do not have this information, then you will need to contact them before you can continue. If you&#8217;re all ready, <a href="setup-config.php?step=1">let&#8217;s go</a>! </p>
+<p>In all likelihood, these items were supplied to you by your ISP. If you do not have this information, then you will need to contact them before you can continue. If you&#8217;re all ready&hellip;</p>
+
+<p><a href="setup-config.php?step=1" class="button">Let&#8217;s go!</a></p>
 <?php
        break;
 
        case 1:
                display_header();
        ?>
-</p>
 <form method="post" action="setup-config.php?step=2">
        <p>Below you should enter your database connection details. If you're not sure about these, contact your host. </p>
-       <table>
+       <table class="form-table">
                <tr>
                        <th scope="row">Database Name</th>
                        <td><input name="dbname" type="text" size="25" value="wordpress" /></td>
@@ -140,7 +94,7 @@ switch($step) {
                </tr>
        </table>
        <h2 class="step">
-       <input name="submit" type="submit" value="Submit" />
+       <input name="submit" type="submit" value="Submit" class="button" />
        </h2>
 </form>
 <?php
@@ -161,7 +115,7 @@ switch($step) {
        define('DB_HOST', $dbhost);
 
        // We'll fail here if the values are no good.
-       require_once('../wp-includes/wp-db.php');
+       require_wp_db();
        if ( !empty($wpdb->error) )
                wp_die($wpdb->error->get_error_message());
 
@@ -190,14 +144,15 @@ switch($step) {
        }
        fclose($handle);
        chmod('../wp-config.php', 0666);
-       
+
        display_header();
 ?>
-<p>All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to <a href="install.php">run the install!</a></p>
+<p>All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to&hellip;</p>
+
+<p><a href="install.php" class="button">Run the install</a></p>
 <?php
        break;
 }
 ?>
-<p id="footer"><a href="http://wordpress.org/">WordPress</a>, personal publishing platform.</p>
 </body>
 </html>