Ticket #14221: 14221.diff
File 14221.diff, 1.7 KB (added by , 14 years ago) |
---|
-
wp-admin/includes/upgrade.php
1130 1130 $wpdb->update( $wpdb->postmeta, array( 'meta_value' => '' ), array( 'meta_key' => '_menu_item_target', 'meta_value' => '_self' ) ); 1131 1131 1132 1132 // 3.0 screen options key name changes. 1133 if ( !is_multisite() || is_main_site() ) {1133 if ( is_main_site() && !defined('DO_NOT_UPGRADE_GLOBAL_TABLES') ) { 1134 1134 $prefix = like_escape($wpdb->base_prefix); 1135 1135 $wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key LIKE '{$prefix}%meta-box-hidden%' OR meta_key LIKE '{$prefix}%closedpostboxes%' OR meta_key LIKE '{$prefix}%manage-%-columns-hidden%' OR meta_key LIKE '{$prefix}%meta-box-order%' OR meta_key LIKE '{$prefix}%metaboxorder%' OR meta_key LIKE '{$prefix}%screen_layout%' 1136 1136 OR meta_key = 'manageedittagscolumnshidden' OR meta_key='managecategoriescolumnshidden' OR meta_key = 'manageedit-tagscolumnshidden' OR meta_key = 'manageeditcolumnshidden' OR meta_key = 'categories_per_page' OR meta_key = 'edit_tags_per_page'" ); … … 1399 1399 if ($tables = $wpdb->get_col('SHOW TABLES;')) { 1400 1400 // For every table in the database 1401 1401 foreach ($tables as $table) { 1402 // 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 continue; 1405 1402 1406 // If a table query exists for the database table... 1403 1407 if ( array_key_exists(strtolower($table), $cqueries) ) { 1404 1408 // Clear the field and index arrays