X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f9001779751f83dc8a10e478bfecb4d8dd5f964c..03f2fa83c13c1b532284205fa7efcab9b8b2c41f:/wp-admin/install.php?ds=sidebyside diff --git a/wp-admin/install.php b/wp-admin/install.php index 0b65f523..0e30ec0c 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -9,15 +9,15 @@ // 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,48 @@ 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 WordPress Translation Install API */ +require_once( ABSPATH . 'wp-admin/includes/translation-install.php' ); /** Load wpdb */ -require_once(dirname(dirname(__FILE__)) . '/wp-includes/wp-db.php'); +require_once( ABSPATH . WPINC . '/wp-db.php' ); + +nocache_headers(); -$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 + * + * @param string $body_classes */ -function display_header() { +function display_header( $body_classes = '' ) { header( 'Content-Type: text/html; charset=utf-8' ); + if ( is_rtl() ) { + $body_classes .= 'rtl'; + } + if ( $body_classes ) { + $body_classes = ' ' . $body_classes; + } ?> - + > + +' . __( '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.' ) . '
' ); } +/** + * @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(); - die('' . $compat . '