Make WordPress Core

Changeset 33646


Ignore:
Timestamp:
08/19/2015 11:30:42 AM (9 years ago)
Author:
dd32
Message:

Term Splitting: Fix a reversal of parameters to wp_schedule_single_event() introduced in [33621].
The existing invalid cron entries will not be purged automatically (as the 'timestamp' is never matched) so we do this ourselves.

Props mechter for noticing!
See #30261.
Fixes #33423 for trunk.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r33627 r33646  
    534534    if ( $wp_current_db_version < 33055 )
    535535        upgrade_430();
     536
     537    if ( $wp_current_db_version < 33056 )
     538        upgrade_431();
    536539
    537540    maybe_disable_link_manager();
     
    15791582
    15801583/**
     1584 * Executes changes made in WordPress 4.3.1.
     1585 *
     1586 * @since 4.3.1
     1587 */
     1588function upgrade_431() {
     1589    // Fix incorrect cron entries for term splitting
     1590    $cron_array = _get_cron_array();
     1591    if ( isset( $cron_array['wp_batch_split_terms'] ) ) {
     1592        foreach ( $cron_array['wp_batch_split_terms'] as $timestamp_hook => $cron_data ) {
     1593            foreach ( $cron_data as $key => $args ) {
     1594                wp_unschedule_event( 'wp_batch_split_terms', $timestamp_hook, $args['args'] );
     1595            }
     1596        }
     1597    }
     1598}
     1599
     1600/**
    15811601 * Executes network-level upgrade routines.
    15821602 *
  • trunk/src/wp-includes/taxonomy.php

    r33619 r33646  
    44464446function _wp_check_for_scheduled_split_terms() {
    44474447    if ( ! get_option( 'finished_splitting_shared_terms' ) && ! wp_next_scheduled( 'wp_batch_split_terms' ) ) {
    4448         wp_schedule_single_event( 'wp_batch_split_terms', time() + MINUTE_IN_SECONDS );
     4448        wp_schedule_single_event( time() + MINUTE_IN_SECONDS, 'wp_batch_split_terms' );
    44494449    }
    44504450}
  • trunk/src/wp-includes/version.php

    r33636 r33646  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 33055;
     14$wp_db_version = 33056;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.