X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/9c40b4d36daed9e28e48a5fe9205c32557195a4b..312084b5d95c21feb519ff03decf948420e1f6fa:/wp-admin/install.php diff --git a/wp-admin/install.php b/wp-admin/install.php index a9579ff4..0e9b87b9 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -49,6 +49,12 @@ header( 'Content-Type: text/html; charset=utf-8' ); }//end function display_header(); function display_setup_form( $error = null ) { + // Ensure that Blogs appear in search engines by default + $blog_public = 1; + if ( isset($_POST) && !empty($_POST) ) { + $blog_public = isset($_POST['blog_public']); + } + if ( ! is_null( $error ) ) { ?>

ERROR: %s'), $error); ?>

@@ -62,10 +68,10 @@ function display_setup_form( $error = null ) {
- + - +

@@ -76,6 +82,23 @@ function display_setup_form( $error = null ) { // Let's check to make sure WP isn't already installed. if ( is_blog_installed() ) {display_header(); die('

'.__('Already Installed').'

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

');} +$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 ); +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 ); +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 ); + +if ( !$mysql_compat || !$php_compat ) { + display_header(); + die('

' . __('Insufficient Requirements') . '

' . $compat . '

'); +} + switch($step) { case 0: case 1: // in case people are directly linking to this