X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7f1521bf193b382565eb753043c161f4cb3fcda7..HEAD:/wp-admin/setup-config.php diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 34e19c76..1404c325 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -5,8 +5,6 @@ * The permissions for the base directory must allow for writing files in order * for the wp-config.php to be created using this page. * - * @internal This file must be parsable by PHP4. - * * @package WordPress * @subpackage Administration */ @@ -28,7 +26,9 @@ define('WP_SETUP_CONFIG', true); */ error_reporting(0); -define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' ); +if ( ! defined( 'ABSPATH' ) ) { + define( 'ABSPATH', dirname( dirname( __FILE__ ) ) . '/' ); +} require( ABSPATH . 'wp-settings.php' ); @@ -46,15 +46,26 @@ if ( file_exists( 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.' ) ); + wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file to your WordPress installation.' ) ); // 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' ) . '
' ); + wp_die( '' . sprintf( + /* translators: %s: install.php */ + __( "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' + ) . '
' + ); // Check if wp-config.php exists above the root directory but is not part of another install -if ( file_exists(ABSPATH . '../wp-config.php' ) && ! file_exists( ABSPATH . '../wp-settings.php' ) ) - wp_die( '' . sprintf( __( "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 installing now."), 'install.php' ) . '
' ); +if ( @file_exists( ABSPATH . '../wp-config.php' ) && ! @file_exists( ABSPATH . '../wp-settings.php' ) ) { + wp_die( '' . sprintf( + /* translators: %s: install.php */ + __( "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 installing now." ), + 'install.php' + ) . '
' + ); +} $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : -1; @@ -63,9 +74,13 @@ $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : -1; * * @ignore * @since 2.3.0 + * + * @global string $wp_local_package + * @global WP_Locale $wp_locale + * + * @param string|array $body_classes */ function setup_config_display_header( $body_classes = array() ) { - global $wp_version; $body_classes = (array) $body_classes; $body_classes[] = 'wp-core-ui'; if ( is_rtl() ) { @@ -79,11 +94,12 @@ function setup_config_display_header( $body_classes = array() ) { +
- wp-config.php file.' ); ?>
- wp-config-sample.php in a text editor, fill in your information, and save it as wp-config.php
." ); ?>
- We got it." ); ?>
-
wp-config.php'
+ );
+ ?>
+ wp-config-sample.php',
+ 'wp-config.php
'
+ );
+ ?>
+ We got it.' ),
+ __( 'https://codex.wordpress.org/Editing_wp-config.php' )
+ );
+?>