From cb154ad4f5a74854f18036f461035954628f2ea8 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 29 Aug 2013 20:46:09 +0000 Subject: [PATCH] Move wp-config-sample.php to the root of develop.svn. wp-config.php is now created in the root. wp-config-sample.php is properly copied over to the build directory for syncing to core.svn. Add some ignores. fixes #25185, see #24976. Built from https://develop.svn.wordpress.org/trunk@25173 git-svn-id: http://core.svn.wordpress.org/trunk@25147 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/setup-config.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) 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();