]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/upgrade.php
Wordpress 2.0.4
[autoinstalls/wordpress.git] / wp-admin / upgrade.php
index 53eb154924187d4830fa4452456b8af59d0cffd7..3c30d940a4c568e07bef1bfb4bef6549fdc9d9c3 100644 (file)
@@ -67,7 +67,7 @@ text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: it
 switch($step) {
 
        case 0:
-       $goback = wp_specialchars($_SERVER['HTTP_REFERER'], 1);
+       $goback = wp_specialchars(wp_get_referer());
 ?> 
 <p><?php _e('This file upgrades you from any previous version of WordPress to the latest. It may take a while though, so be patient.'); ?></p> 
        <h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2>
@@ -75,10 +75,13 @@ switch($step) {
        break;
        
        case 1:
-       wp_cache_flush();
-       make_db_current_silent();
-       upgrade_all();
-       wp_cache_flush();
+       $wp_current_db_version = __get_option('db_version');
+       if ( $wp_db_version != $wp_current_db_version ) {
+               wp_cache_flush();
+               make_db_current_silent();
+               upgrade_all();
+               wp_cache_flush();
+       }
 
        if ( empty( $_GET['backto'] ) )
                $backto = __get_option('home');