Changeset 41904
- Timestamp:
- 10/18/2017 03:26:10 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/setup-config.php
r41631 r41904 42 42 43 43 // Support wp-config-sample.php one level up, for the develop repo. 44 if ( file_exists( ABSPATH . 'wp-config-sample.php' ) ) 44 if ( file_exists( ABSPATH . 'wp-config-sample.php' ) ) { 45 45 $config_file = file( ABSPATH . 'wp-config-sample.php' ); 46 elseif ( file_exists( dirname( ABSPATH ) . '/wp-config-sample.php' ) ) 46 } elseif ( file_exists( dirname( ABSPATH ) . '/wp-config-sample.php' ) ) { 47 47 $config_file = file( dirname( ABSPATH ) . '/wp-config-sample.php' ); 48 else 49 wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file to your WordPress installation.' ) ); 48 } else { 49 wp_die( sprintf( 50 /* translators: %s: wp-config-sample.php */ 51 __( 'Sorry, I need a %s file to work from. Please re-upload this file to your WordPress installation.' ), 52 '<code>wp-config-sample.php</code>' 53 ) ); 54 } 50 55 51 56 // Check if wp-config.php has been created 52 if ( file_exists( ABSPATH . 'wp-config.php' ) ) 57 if ( file_exists( ABSPATH . 'wp-config.php' ) ) { 53 58 wp_die( '<p>' . sprintf( 54 /* translators: %s: install.php */ 55 __( "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 <a href='%s'>installing now</a>." ), 59 /* translators: 1: wp-config.php 2: install.php */ 60 __( 'The file %1$s already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href="%2$s">installing now</a>.' ), 61 '<code>wp-config.php</code>', 56 62 'install.php' 57 63 ) . '</p>' 58 64 ); 65 } 59 66 60 67 // Check if wp-config.php exists above the root directory but is not part of another installation 61 68 if ( @file_exists( ABSPATH . '../wp-config.php' ) && ! @file_exists( ABSPATH . '../wp-settings.php' ) ) { 62 69 wp_die( '<p>' . sprintf( 63 /* translators: %s: install.php */ 64 __( "The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='%s'>installing now</a>." ), 70 /* translators: 1: wp-config.php 2: install.php */ 71 __( 'The file %1$s already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href="%2$s">installing now</a>.' ), 72 '<code>wp-config.php</code>', 65 73 'install.php' 66 74 ) . '</p>' … … 364 372 <p><?php 365 373 /* translators: %s: wp-config.php */ 366 printf( __( 'You can create the %s manually and paste the following text into it.' ), '<code>wp-config.php</code>' );374 printf( __( 'You can create the %s file manually and paste the following text into it.' ), '<code>wp-config.php</code>' ); 367 375 ?></p> 368 376 <textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php
Note: See TracChangeset
for help on using the changeset viewer.