WordPress.org

Make WordPress Core

Changeset 33647 for branches/4.3


Ignore:
Timestamp:
08/19/2015 11:36:06 AM (3 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.

Merges [33646] to the 4.3 branch.
Props mechter for noticing!
See #30261.
Fixes #33423 for the 4.3 branch.

Location:
branches/4.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/4.3

  • branches/4.3/src/wp-admin/includes/upgrade.php

    r33627 r33647  
    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 *
  • branches/4.3/src/wp-includes/taxonomy.php

    r33619 r33647  
    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}
  • branches/4.3/src/wp-includes/version.php

    r33633 r33647  
    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.