X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7f1521bf193b382565eb753043c161f4cb3fcda7..3d39054f012aefe514b3f5509e32f09fc4feda44:/wp-admin/install.php diff --git a/wp-admin/install.php b/wp-admin/install.php index 6f317cfb..24039820 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(); @@ -180,9 +246,33 @@ if ( !$mysql_compat || !$php_compat ) { if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) { display_header(); - die( '

' . __( 'Configuration Error' ) . '

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

' ); + die( + '

' . __( 'Configuration Error' ) . '

' . + '

' . sprintf( + /* translators: %s: wp-config.php */ + __( 'Your %s file has an empty database table prefix, which is not supported.' ), + 'wp-config.php' + ) . '

' + ); } +// 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' ) . '

' . + '

' . sprintf( + /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */ + __( 'The constant %s cannot be defined when installing WordPress.' ), + 'DO_NOT_UPGRADE_GLOBAL_TABLES' + ) . '

' + ); +} + +/** + * @global string $wp_local_package + * @global WP_Locale $wp_locale + */ $language = ''; if ( ! empty( $_REQUEST['language'] ) ) { $language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] ); @@ -190,10 +280,12 @@ if ( ! empty( $_REQUEST['language'] ) ) { $language = $GLOBALS['wp_local_package']; } +$scripts_to_print = array( 'jquery' ); + switch($step) { case 0: // Step 0 - if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) { + $scripts_to_print[] = 'language-chooser'; display_header( 'language-chooser' ); echo '
'; wp_install_language_form( $languages ); @@ -212,12 +304,14 @@ switch($step) { } } + $scripts_to_print[] = 'user-profile'; + display_header(); ?>

-

+

error ) ) wp_die( $wpdb->error->get_error_message() ); + $scripts_to_print[] = 'user-profile'; + display_header(); // Fill in the data we gathered $weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : ''; @@ -241,9 +337,9 @@ switch($step) { $admin_password = isset($_POST['admin_password']) ? wp_unslash( $_POST['admin_password'] ) : ''; $admin_password_check = isset($_POST['admin_password2']) ? wp_unslash( $_POST['admin_password2'] ) : ''; $admin_email = isset( $_POST['admin_email'] ) ?trim( wp_unslash( $_POST['admin_email'] ) ) : ''; - $public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 0; + $public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 1; - // Check e-mail address. + // Check email address. $error = false; if ( empty( $user_name ) ) { // TODO: poka-yoke @@ -273,7 +369,7 @@ switch($step) {

-

+

@@ -291,17 +387,25 @@ switch($step) {
-

+

+ +if ( ! wp_is_mobile() ) { + ?> - - - + +