Changeset 3738

Show
Ignore:
Timestamp:
04/21/06 21:33:50 (3 years ago)
Author:
ryan
Message:

Only flush cache if the DB is out-of-date.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/wp-admin/upgrade.php

    r3420 r3738  
    7676     
    7777    case 1: 
    78     wp_cache_flush(); 
    79     make_db_current_silent(); 
    80     upgrade_all(); 
    81     wp_cache_flush(); 
     78    $wp_current_db_version = __get_option('db_version'); 
     79    if ( $wp_db_version < $wp_current_db_version ) { 
     80        wp_cache_flush(); 
     81        make_db_current_silent(); 
     82        upgrade_all(); 
     83        wp_cache_flush(); 
     84    } 
    8285 
    8386    if ( empty( $_GET['backto'] ) )