Changeset 25173 for trunk/src/wp-admin/setup-config.php
- Timestamp:
- 08/29/2013 08:45:17 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 wp-config.php 2 2 wp-tests-config.php 3 phpunit.xml 3 4 node_modules 4 5 npm-debug.log
-
- Property svn:ignore
-
trunk/src/wp-admin/setup-config.php
r23567 r25173 63 63 wp_magic_quotes(); 64 64 65 if ( ! file_exists( ABSPATH . 'wp-config-sample.php' ) ) 65 // Support wp-config-sample.php one level up, for the develop repo. 66 if ( file_exists( ABSPATH . 'wp-config-sample.php' ) ) 67 $config_file = file( ABSPATH . 'wp-config-sample.php' ); 68 elseif ( file_exists( dirname( ABSPATH ) . '/wp-config-sample.php' ) ) 69 $config_file = file( dirname( ABSPATH ) . '/wp-config-sample.php' ); 70 else 66 71 wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.' ) ); 67 68 $config_file = file(ABSPATH . 'wp-config-sample.php');69 72 70 73 // Check if wp-config.php has been created … … 276 279 <?php 277 280 else : 278 $handle = fopen(ABSPATH . 'wp-config.php', 'w'); 281 // If this file doesn't exist, then we are using the wp-config-sample.php 282 // file one level up, which is for the develop repo. 283 if ( file_exists( ABSPATH . 'wp-config-sample.php' ) ) 284 $path_to_wp_config = ABSPATH . 'wp-config.php'; 285 else 286 $path_to_wp_config = dirname( ABSPATH ) . '/wp-config.php'; 287 288 $handle = fopen( $path_to_wp_config, 'w' ); 279 289 foreach( $config_file as $line ) { 280 fwrite( $handle, $line);281 } 282 fclose( $handle);283 chmod( ABSPATH . 'wp-config.php', 0666);290 fwrite( $handle, $line ); 291 } 292 fclose( $handle ); 293 chmod( $path_to_wp_config, 0666 ); 284 294 setup_config_display_header(); 285 295 ?>
Note: See TracChangeset
for help on using the changeset viewer.