1
0
mirror of https://github.com/WordPress/WordPress.git synced 2025-03-09 13:19:20 +01:00

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 , see .


Built from https://develop.svn.wordpress.org/trunk@25173


git-svn-id: http://core.svn.wordpress.org/trunk@25147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-08-29 20:46:09 +00:00
parent f16aee063e
commit cb154ad4f5

View File

@ -62,10 +62,13 @@ 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' ) )
wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.' ) );
// 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.' ) );
// Check if wp-config.php has been created
if ( file_exists( ABSPATH . 'wp-config.php' ) )
@ -275,12 +278,19 @@ el.select();
</script>
<?php
else :
$handle = fopen(ABSPATH . 'wp-config.php', 'w');
// If this file doesn't exist, then we are using the wp-config-sample.php
// file one level up, which is for the develop repo.
if ( file_exists( ABSPATH . 'wp-config-sample.php' ) )
$path_to_wp_config = ABSPATH . 'wp-config.php';
else
$path_to_wp_config = dirname( ABSPATH ) . '/wp-config.php';
$handle = fopen( $path_to_wp_config, 'w' );
foreach( $config_file as $line ) {
fwrite( $handle, $line );
}
fclose( $handle );
chmod(ABSPATH . 'wp-config.php', 0666);
chmod( $path_to_wp_config, 0666 );
setup_config_display_header();
?>
<p><?php _e( "All right, sparky! You&#8217;ve made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to&hellip;" ); ?></p>