X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/4f9d63e13cd8c6e275797c75b401b074b82937bc..refs/tags/wordpress-3.4.2-scripts:/wp-admin/install.php diff --git a/wp-admin/install.php b/wp-admin/install.php index 58be0738..e39d1f4f 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -9,14 +9,14 @@ // Sanity check. if ( false ) { ?> - - + + Error: PHP is not running -

WordPress

+

WordPress

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.

@@ -41,7 +41,7 @@ require_once( dirname( __FILE__ ) . '/includes/upgrade.php' ); /** Load wpdb */ require_once(dirname(dirname(__FILE__)) . '/wp-includes/wp-db.php'); -$step = isset( $_GET['step'] ) ? $_GET['step'] : 0; +$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; /** * Display install header. @@ -53,15 +53,15 @@ $step = isset( $_GET['step'] ) ? $_GET['step'] : 0; function display_header() { header( 'Content-Type: text/html; charset=utf-8' ); ?> - + > <?php _e( 'WordPress › Installation' ); ?> - -

WordPress

+> +

WordPress

- + +

@@ -150,15 +151,20 @@ $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(); - die('

' . __('Insufficient Requirements') . '

' . $compat . '

'); + die( '

' . __( 'Insufficient Requirements' ) . '

' . $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.' ) . '

' ); } switch($step) { @@ -166,7 +172,7 @@ switch($step) { case 1: // Step 1, direct link. display_header(); ?> -

+

ReadMe documentation at your leisure. Otherwise, just fill in the information below and you’ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ), '../readme.html' ); ?>

@@ -206,7 +212,7 @@ switch($step) { $error = true; } elseif ( ! is_email( $admin_email ) ) { // TODO: poka-yoke - display_setup_form( __( 'that isn’t a valid e-mail address. E-mail addresses look like: username@example.com' ) ); + display_setup_form( __( 'that isn’t a valid e-mail address. E-mail addresses look like: username@example.com' ) ); $error = true; } @@ -220,10 +226,10 @@ switch($step) {

- +
- + @@ -243,22 +249,6 @@ switch($step) { } ?> - - - - - +