Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/setup-config.php

    r3673 r3208  
    22define('WP_INSTALLING', true);
    33
     4if (file_exists('../wp-config.php'))
     5        die("The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.");
     6
    47if (!file_exists('../wp-config-sample.php'))
    58    die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
    6 
    79$configFile = file('../wp-config-sample.php');
    810
    911if (!is_writable('../')) 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.");
    1012
    11 
    12 if (isset($_GET['step']))
    13         $step = $_GET['step'];
    14 else
    15         $step = 0;
     13$step = 0;
     14if(isset($_GET['step'])) $step = $_GET['step'];
    1615header( 'Content-Type: text/html; charset=utf-8' );
    1716?>
    … …  
    2221<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    2322<style media="screen" type="text/css">
    24         <!--
    25         html {
    26                 background: #eee;
    27         }
     23    <!--
    2824        body {
    29                 background: #fff;
    30                 color: #000;
    3125                font-family: Georgia, "Times New Roman", Times, serif;
    32                 margin-left: 20%;
    33                 margin-right: 20%;
    34                 padding: .2em 2em;
    35         }
    36 
    37         h1 {
    38                 color: #006;
    39                 font-size: 18px;
    40                 font-weight: lighter;
    41         }
    42 
    43         h2 {
    44                 font-size: 16px;
    45         }
    46 
    47         p, li, dt {
    48                 line-height: 140%;
    49                 padding-bottom: 2px;
    50         }
    51 
    52         ul, ol {
    53                 padding: 5px 5px 5px 20px;
     26                margin-left: 15%;
     27                margin-right: 15%;
    5428        }
    5529        #logo {
    56                 margin-bottom: 2em;
     30                margin: 0;
     31                padding: 0;
     32                background-image: url(http://wordpress.org/images/logo.png);
     33                background-repeat: no-repeat;
     34                height: 60px;
     35                border-bottom: 4px solid #333;
    5736        }
    58         .step a, .step input {
    59                 font-size: 2em;
     37        #logo a {
     38                display: block;
     39                height: 60px;
    6040        }
    61         td input {
    62                 font-size: 1.5em;
     41        #logo a span {
     42                display: none;
    6343        }
    64         .step, th {
    65                 text-align: right;
     44        p, li {
     45                line-height: 140%;
    6646        }
    67         #footer {
    68                 text-align: center;
    69                 border-top: 1px solid #ccc;
    70                 padding-top: 1em;
    71                 font-style: italic;
    72         }
    73         -->
     47    -->
    7448        </style>
    7549</head>
    76 <body>
    77 <h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
     50<body> 
     51<h1 id="logo"><a href="http://wordpress.org/"><span>WordPress</span></a></h1>
    7852<?php
    79 // Check if wp-config.php has been created
    80 if (file_exists('../wp-config.php'))
    81         die("<p>The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p></body></html>");
    8253
    8354switch($step) {
    8455        case 0:
    8556?>
    86 
    8757<p>Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.</p>
    8858<ol>
    8959  <li>Database name</li>
    9060  <li>Database username</li>
    91   <li>Database password</li>
     61  <li>Database password</li> 
    9262  <li>Database host</li>
    9363  <li>Table prefix (if you want to run more than one WordPress in a single database) </li>
    … …  
    10171        ?>
    10272</p>
    103 <form method="post" action="setup-config.php?step=2">
     73<form method="post" action="setup-config.php?step=2"> 
    10474  <p>Below you should enter your database connection details. If you're not sure about these, contact your host. </p>
    10575  <table>
    10676    <tr>
    10777      <th scope="row">Database Name</th>
    108       <td><input name="dbname" type="text" size="25" value="wordpress" /></td>
     78      <td><input name="dbname" type="text" size="45" value="wordpress" /></td>
    10979      <td>The name of the database you want to run WP in. </td>
    11080    </tr>
    11181    <tr>
    11282      <th scope="row">User Name</th>
    113       <td><input name="uname" type="text" size="25" value="username" /></td>
     83      <td><input name="uname" type="text" size="45" value="username" /></td>
    11484      <td>Your MySQL username</td>
    11585    </tr>
    11686    <tr>
    11787      <th scope="row">Password</th>
    118       <td><input name="pwd" type="text" size="25" value="password" /></td>
     88      <td><input name="pwd" type="text" size="45" value="password" /></td>
    11989      <td>...and MySQL password.</td>
    12090    </tr>
    12191    <tr>
    12292      <th scope="row">Database Host</th>
    123       <td><input name="dbhost" type="text" size="25" value="localhost" /></td>
     93      <td><input name="dbhost" type="text" size="45" value="localhost" /></td>
    12494      <td>99% chance you won't need to change this value.</td>
    12595    </tr>
    12696    <tr>
    12797      <th scope="row">Table Prefix</th>
    128       <td><input name="prefix" type="text" id="prefix" value="wp_" size="25" /></td>
     98      <td><input name="prefix" type="text" id="prefix" value="wp_" size="45" /></td>
    12999      <td>If you want to run multiple WordPress installations in a single database, change this.</td>
    130100    </tr>
    131   </table>
    132   <h2 class="step">
    133   <input name="submit" type="submit" value="Submit" />
    134   </h2>
     101  </table>
     102  <input name="submit" type="submit" value="Submit" />
    135103</form>
    136104<?php
    137105        break;
    138 
     106       
    139107        case 2:
    140108        $dbname  = trim($_POST['dbname']);
    … …  
    182150<?php
    183151        break;
     152
    184153}
    185 ?>
    186 <p id="footer"><a href="http://wordpress.org/">WordPress</a>, personal publishing platform.</p>
     154?>
    187155</body>
    188156</html>
Note: See TracChangeset for help on using the changeset viewer.