X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/849f15aeed7a5e39314057bdc0064d8edd60dd7d..c81aba3d563f7459dc79140e4c5be67bcf506b92:/wp-admin/install.php diff --git a/wp-admin/install.php b/wp-admin/install.php index 93c9d72f..0e30ec0c 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -16,8 +16,8 @@ if ( false ) { Error: PHP is not running -

WordPress

-

Error: PHP is not running

+ +

Error: PHP is not running

WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.

@@ -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' ); @@ -67,13 +69,15 @@ function display_header( $body_classes = '' ) { + <?php _e( 'WordPress › Installation' ); ?> -

+ +

@@ -124,30 +131,78 @@ 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' ) . '

' ); + die( '

' . __( '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(); $mysql_version = $wpdb->db_version(); $php_compat = version_compare( $php_version, $required_php_version, '>=' ); $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); if ( !$mysql_compat && !$php_compat ) - $compat = sprintf( __( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); + $compat = sprintf( __( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); elseif ( !$php_compat ) - $compat = sprintf( __( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version ); + $compat = sprintf( __( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version ); elseif ( !$mysql_compat ) - $compat = sprintf( __( 'You cannot install because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version ); + $compat = sprintf( __( 'You cannot install because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version ); if ( !$mysql_compat || !$php_compat ) { display_header(); @@ -181,6 +244,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'] ); @@ -215,7 +288,7 @@ switch($step) {

-

+

-

+

+