Make WordPress Core

Ticket #22134: 22134.diff

File 22134.diff, 1023 bytes (added by wonderboymusic, 11 years ago)
  • src/wp-admin/includes/upgrade.php

     
    15491549        $global_tables = $wpdb->tables( 'global' );
    15501550        foreach ( $cqueries as $table => $qry ) {
    15511551                // Upgrade global tables only for the main site. Don't upgrade at all if DO_NOT_UPGRADE_GLOBAL_TABLES is defined.
    1552                 if ( in_array( $table, $global_tables ) && ( !is_main_site() || defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) )
     1552                if ( in_array( $table, $global_tables ) && ( ! is_main_site() || defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) ) {
     1553                        $suppress = $wpdb->suppress_errors();
     1554                        $tablefields = $wpdb->get_results( "DESCRIBE {$table};" );
     1555                        $wpdb->suppress_errors( $suppress );
     1556                        if ( $tablefields )
     1557                                unset( $cqueries[ $table ], $for_update[ $table ] );
    15531558                        continue;
     1559                }
    15541560
    15551561                // Fetch the table column structure from the database
    15561562                $suppress = $wpdb->suppress_errors();