X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/022dfbbbe3215917d84708eb09acca93b21ae9e0..3194d1bb103c2d8db4f44feeced5e58ee2756658:/wp-admin/upgrade.php diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php index aa459514..03940b01 100644 --- a/wp-admin/upgrade.php +++ b/wp-admin/upgrade.php @@ -1,107 +1,127 @@ db_version(); +$php_compat = version_compare( $php_version, $required_php_version, '>=' ); +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' ) ); ?> - - + +> - WordPress › Upgrade - - + + + + <?php _e( 'WordPress › Update' ); ?> + - -

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 ); + 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 ); + 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 ); +?> + -

-

+ $goback = wp_get_referer(); + if ( $goback ) { + $goback = esc_url_raw( $goback ); + $goback = urlencode( $goback ); + } +?> +

+

+

+

-

-

Have fun!"), $backto); ?>

+ wp_upgrade(); + + $backto = !empty($_GET['backto']) ? wp_unslash( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/'; + $backto = esc_url( $backto ); + $backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/'); +?> +

+

+

+ break; +endswitch; +endif; +?>