WordPress.org

Make WordPress Core

Ticket #14503: 14503.diff

File 14503.diff, 869 bytes (added by wpmuguru, 5 years ago)
  • wp-admin/includes/upgrade.php

     
    13981398        // Check to see which tables and fields exist 
    13991399        if ($tables = $wpdb->get_col('SHOW TABLES;')) { 
    14001400                // For every table in the database 
     1401                $global_tables = $wpdb->tables( 'global' ); 
    14011402                foreach ($tables as $table) { 
    14021403                        // Upgrade global tables only for the main site. Don't upgrade at all if DO_NOT_UPGRADE_GLOBAL_TABLES is defined. 
    1403                         if ( in_array($table, $wpdb->tables('global')) && ( !is_main_site() || defined('DO_NOT_UPGRADE_GLOBAL_TABLES') ) ) 
     1404                        if ( in_array( $table, $global_tables ) && ( !is_main_site() || defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) ) 
    14041405                                continue; 
    14051406 
    14061407                        // If a table query exists for the database table...