X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f9001779751f83dc8a10e478bfecb4d8dd5f964c..refs/tags/wordpress-4.3:/wp-admin/upgrade.php diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php index fc3698e4..53c1d170 100644 --- a/wp-admin/upgrade.php +++ b/wp-admin/upgrade.php @@ -15,7 +15,9 @@ define( 'WP_INSTALLING', true ); /** Load WordPress Bootstrap */ -require( '../wp-load.php' ); +require( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); + +nocache_headers(); timer_start(); require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); @@ -27,24 +29,36 @@ if ( isset( $_GET['step'] ) ) else $step = 0; -// Do it. No output. +// Do it. No output. if ( 'upgrade_db' === $step ) { wp_upgrade(); die( '0' ); } +/** + * @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; + $step = (int) $step; $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 ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) + $mysql_compat = true; +else + $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ); @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); ?> - + > + <?php _e( 'WordPress › Update' ); ?> =' wp_admin_css( 'ie', true ); ?> - -

WordPress

+ +

-

+

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 ); + printf( __('You cannot update 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 ) - printf( __('You cannot update because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ); + printf( __('You cannot update 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 ) - printf( __('You cannot update because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ); + printf( __('You cannot update because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ); ?>

-

+

-

+