Make WordPress Core

Ticket #12159: 12159.4.diff

File 12159.4.diff, 2.4 KB (added by nacin, 15 years ago)
  • setup-config.php

     
    109109<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>
    110110<p>In all likelihood, these items were supplied to you by your Web Host. 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>
    111111
    112 <p class="step"><a href="setup-config.php?step=1" class="button">Let&#8217;s go!</a></p>
     112<p class="step"><a href="setup-config.php?step=1<?php if ( isset( $_GET['noapi'] ) ) echo '&amp;noapi'; ?>" class="button">Let&#8217;s go!</a></p>
    113113<?php
    114114        break;
    115115
     
    145145                        <td>If you want to run multiple WordPress installations in a single database, change this.</td>
    146146                </tr>
    147147        </table>
     148        <?php if ( isset( $_GET['noapi'] ) ) { ?><input name="noapi" type="hidden" value="true" /><?php } ?>
    148149        <p class="step"><input name="submit" type="submit" value="Submit" class="button" /></p>
    149150</form>
    150151<?php
     
    173174        if ( !empty($wpdb->error) )
    174175                wp_die($wpdb->error->get_error_message());
    175176
     177        // Fetch or generate keys and salts.
     178        $no_api = isset( $_POST['noapi'] );
    176179        require_once( ABSPATH . WPINC . '/plugin.php' );
    177         require_once( ABSPATH . WPINC . '/http.php' );
    178         wp_fix_server_vars();
    179         /**#@+
    180          * @ignore
    181          */
    182         function get_bloginfo() {
    183                 return 'http://' . $_SERVER['HTTP_HOST'] . str_replace( $_SERVER['PHP_SELF'], '/wp-admin/setup-config.php', '' );
     180        if ( ! $no_api ) {
     181                require_once( ABSPATH . WPINC . '/http.php' );
     182                wp_fix_server_vars();
     183                /**#@+
     184                 * @ignore
     185                 */
     186                function get_bloginfo() {
     187                        return 'http://' . $_SERVER['HTTP_HOST'] . str_replace( $_SERVER['PHP_SELF'], '/wp-admin/setup-config.php', '' );
     188                }
     189                /**#@-*/
     190                $secret_keys = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' );
    184191        }
    185         /**#@-*/
    186192
    187         $secret_keys = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' );
    188         if ( is_wp_error( $secret_keys ) ) {
     193        if ( $no_api || is_wp_error( $secret_keys ) ) {
    189194                $secret_keys = array();
    190195                require_once( ABSPATH . WPINC . '/pluggable.php' );
    191196                for ( $i = 0; $i < 8; $i++ )