X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7688c6ba71852cd89123b62b2d57683535e4702a..refs/tags/wordpress-4.3:/wp-admin/upgrade.php
diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php
index 1758d4c9..53c1d170 100644
--- a/wp-admin/upgrade.php
+++ b/wp-admin/upgrade.php
@@ -1,62 +1,119 @@
wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php
file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.");
+/**
+ * Upgrade WordPress Page.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+/**
+ * We are upgrading WordPress.
+ *
+ * @since 1.5.1
+ * @var bool
+ */
+define( 'WP_INSTALLING', true );
+
+/** Load WordPress Bootstrap */
+require( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
+
+nocache_headers();
-require('../wp-config.php');
timer_start();
-require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
+require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
-if (isset($_GET['step']))
- $step = (int) $_GET['step'];
+delete_site_transient('update_core');
+
+if ( isset( $_GET['step'] ) )
+ $step = $_GET['step'];
else
$step = 0;
-@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+
+// 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, '>=' );
+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' ) );
?>
-
+
>