Ticket #20316: 20316.4.diff
File 20316.4.diff, 2.9 KB (added by , 12 years ago) |
---|
-
src/wp-admin/includes/schema.php
546 546 547 547 // delete obsolete magpie stuff 548 548 $wpdb->query("DELETE FROM $wpdb->options WHERE option_name REGEXP '^rss_[0-9a-f]{32}(_ts)?$'"); 549 // clear transient data 550 $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '\_transient\_%' OR option_name LIKE '\_site\_transient\_%'" ); 549 550 // Deletes all expired transients. 551 // The multi-table delete syntax is used to delete the transient record from table a, 552 // and the corresponding transient_timeout record from table b. 553 $time = time(); 554 $wpdb->query("DELETE a, b FROM $wpdb->options a, $wpdb->options b WHERE 555 a.option_name LIKE '\_transient\_%' AND 556 a.option_name NOT LIKE '\_transient\_timeout\_%' AND 557 b.option_name = CONCAT( '_transient_timeout_', SUBSTRING( a.option_name, 12 ) ) 558 AND b.option_value < $time"); 559 560 if ( is_main_site() && is_main_network() ) { 561 $wpdb->query("DELETE a, b FROM $wpdb->options a, $wpdb->options b WHERE 562 a.option_name LIKE '\_site\_transient\_%' AND 563 a.option_name NOT LIKE '\_site\_transient\_timeout\_%' AND 564 b.option_name = CONCAT( '_site_transient_timeout_', SUBSTRING( a.option_name, 17 ) ) 565 AND b.option_value < $time"); 566 } 551 567 } 552 568 553 569 /** -
src/wp-admin/includes/upgrade.php
402 402 if ( $wp_current_db_version < 22422 ) 403 403 upgrade_350(); 404 404 405 if ( $wp_current_db_version < 25824 )406 upgrade_370();407 408 405 maybe_disable_link_manager(); 409 406 410 407 maybe_disable_automattic_widgets(); … … 1212 1209 } 1213 1210 1214 1211 /** 1215 * Execute changes made in WordPress 3.7.1216 *1217 * @since 3.7.01218 */1219 function upgrade_370() {1220 global $wp_current_db_version;1221 if ( $wp_current_db_version < 25824 )1222 wp_clear_scheduled_hook( 'wp_auto_updates_maybe_update' );1223 }1224 1225 /**1226 1212 * Execute network level changes 1227 1213 * 1228 1214 * @since 3.0.0 1229 1215 */ 1230 1216 function upgrade_network() { 1231 1217 global $wp_current_db_version, $wpdb; 1218 1219 // Always 1220 if ( is_main_network() ) { 1221 // Deletes all expired transients. 1222 // The multi-table delete syntax is used to deletethe transient record from table a, 1223 // and the corresponding transient_timeout record from table b. 1224 $time = time(); 1225 $wpdb->query("DELETE a, b FROM $wpdb->sitemeta a, $wpdb->sitemeta b WHERE 1226 a.meta_key LIKE '\_site\_transient\_%' AND 1227 a.meta_key NOT LIKE '\_site\_transient\_timeout\_%' AND 1228 b.meta_key = CONCAT( '_site_transient_timeout_', SUBSTRING( a.meta_key, 17 ) ) 1229 AND b.meta_value < $time"); 1230 } 1231 1232 1232 // 2.8 1233 1233 if ( $wp_current_db_version < 11549 ) { 1234 1234 $wpmu_sitewide_plugins = get_site_option( 'wpmu_sitewide_plugins' );