X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f5fcdc7994bb67cce809bc4777944ae8b7fad4a4..refs/tags/wordpress-4.3:/wp-admin/install.php?ds=sidebyside diff --git a/wp-admin/install.php b/wp-admin/install.php index 6f317cfb..2c0c6071 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -52,6 +52,8 @@ $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; * Display install header. * * @since 2.5.0 + * + * @param string $body_classes */ function display_header( $body_classes = '' ) { header( 'Content-Type: text/html; charset=utf-8' ); @@ -69,7 +71,8 @@ function display_header( $body_classes = '' ) { <?php _e( 'WordPress › Installation' ); ?> @@ -82,6 +85,8 @@ function display_header( $body_classes = '' ) { * Display installer setup form. * * @since 2.8.0 + * + * @param string|null $error */ function display_setup_form( $error = null ) { global $wpdb; @@ -124,16 +129,45 @@ function display_setup_form( $error = null ) { - + - -

+ - -

-
-

+
+ + + +
+
+

+ + +

+ + + + + + + + + + + + + + @@ -144,10 +178,10 @@ function display_setup_form( $error = null ) { - + -

+

'submit' ) ); ?>

' . __( 'Already Installed' ) . '

' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '

' . __( 'Log In' ) . '

' ); } +/** + * @global string $wp_version + * @global string $required_php_version + * @global string $required_mysql_version + * @global wpdb $wpdb + */ global $wp_version, $required_php_version, $required_mysql_version; $php_version = phpversion(); @@ -183,6 +223,16 @@ if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) { die( '

' . __( 'Configuration Error' ) . '

' . __( 'Your wp-config.php file has an empty database table prefix, which is not supported.' ) . '

' ); } +// Set error message if DO_NOT_UPGRADE_GLOBAL_TABLES isn't set as it will break install. +if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { + display_header(); + die( '

' . __( 'Configuration Error' ) . '

' . __( 'The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when installing WordPress.' ) . '

' ); +} + +/** + * @global string $wp_local_package + * @global WP_Locale $wp_locale + */ $language = ''; if ( ! empty( $_REQUEST['language'] ) ) { $language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] ); @@ -303,5 +353,10 @@ if ( !wp_is_mobile() ) { +