X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/6e54d1cc889fd70eca54701860d695634b28a075..41578db67d72562346e4dbb2a14889b23d522813:/wp-admin/install.php diff --git a/wp-admin/install.php b/wp-admin/install.php index d23073b6..d29c8098 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -9,14 +9,14 @@ // Sanity check. if ( false ) { ?> - - + +
WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.
@@ -36,32 +36,33 @@ define( 'WP_INSTALLING', true ); require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); /** Load WordPress Administration Upgrade API */ -require_once( dirname( __FILE__ ) . '/includes/upgrade.php' ); +require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); /** Load wpdb */ -require_once(dirname(dirname(__FILE__)) . '/wp-includes/wp-db.php'); +require_once( ABSPATH . 'wp-includes/wp-db.php' ); -$step = isset( $_GET['step'] ) ? $_GET['step'] : 0; +$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; /** * Display install header. * * @since 2.5.0 - * @package WordPress - * @subpackage Installer */ function display_header() { header( 'Content-Type: text/html; charset=utf-8' ); ?> - + > +' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '
' ); + die( '' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '
' ); } $php_version = phpversion(); @@ -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('' . $compat . '
'); + die( '' . $compat . '