diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 82d06e99dc..ce3ffe55b7 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -62,11 +62,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' ) . '
' ); @@ -275,12 +278,19 @@ el.select();