X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/61343b82c4f0da4c68e4c6373daafff4a81efdd1..4713a14935b83517997f3c88f808eb41da55033d:/wp-admin/setup-config.php diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 82d06e99..2b5b7f89 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -13,8 +13,6 @@ /** * We are installing. - * - * @package WordPress */ define('WP_INSTALLING', true); @@ -55,6 +53,9 @@ wp_load_translations_early(); // Turn register_globals off. wp_unregister_GLOBALS(); +// Standardize $_SERVER variables across setups. +wp_fix_server_vars(); + require_once(ABSPATH . WPINC . '/compat.php'); require_once(ABSPATH . WPINC . '/class-wp-error.php'); require_once(ABSPATH . WPINC . '/formatting.php'); @@ -62,11 +63,14 @@ require_once(ABSPATH . WPINC . '/formatting.php'); // Add magic quotes and set up $_REQUEST ( $_GET + $_POST ) wp_magic_quotes(); -if ( ! file_exists( ABSPATH . 'wp-config-sample.php' ) ) +// Support wp-config-sample.php one level up, for the develop repo. +if ( file_exists( ABSPATH . 'wp-config-sample.php' ) ) + $config_file = file( ABSPATH . 'wp-config-sample.php' ); +elseif ( file_exists( dirname( ABSPATH ) . '/wp-config-sample.php' ) ) + $config_file = file( dirname( ABSPATH ) . '/wp-config-sample.php' ); +else wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.' ) ); -$config_file = file(ABSPATH . 'wp-config-sample.php'); - // Check if wp-config.php has been created if ( file_exists( ABSPATH . 'wp-config.php' ) ) wp_die( '

' . sprintf( __( "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 installing now." ), 'install.php' ) . '

' ); @@ -82,8 +86,6 @@ $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; * * @ignore * @since 2.3.0 - * @package WordPress - * @subpackage Installer_WP_Config */ function setup_config_display_header() { global $wp_version; @@ -93,6 +95,7 @@ function setup_config_display_header() { > + <?php _e( 'WordPress › Setup Configuration File' ); ?> @@ -100,7 +103,7 @@ function setup_config_display_header() { -

+