Make WordPress Core

Changeset 26450 for branches/3.7


Ignore:
Timestamp:
11/28/2013 02:35:00 AM (11 years ago)
Author:
dd32
Message:

Background Updates: Spread them over the hour. Props Pento. Merges r26149 to the 3.7 branch. Fixes #25833 for 3.7.

Location:
branches/3.7
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

  • branches/3.7/src

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

    r25838 r26450  
    406406        upgrade_370();
    407407
     408    if ( $wp_current_db_version < 26148 )
     409        upgrade_372();
     410
    408411    maybe_disable_link_manager();
    409412
     
    12211224    if ( $wp_current_db_version < 25824 )
    12221225        wp_clear_scheduled_hook( 'wp_auto_updates_maybe_update' );
     1226}
     1227
     1228/**
     1229 * Execute changes made in WordPress 3.7.2.
     1230 *
     1231 * @since 3.7.2
     1232 * @since 3.8.0
     1233 */
     1234function upgrade_372() {
     1235    global $wp_current_db_version;
     1236    if ( $wp_current_db_version < 26148 )
     1237        wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
    12231238}
    12241239
  • branches/3.7/src/wp-includes/update.php

    r25957 r26450  
    585585        }
    586586        $next = $next - get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
     587        // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
     588        $next = $next + rand( 0, 59 ) * MINUTE_IN_SECONDS;
    587589        wp_schedule_event( $next, 'twicedaily', 'wp_maybe_auto_update' );
    588590    }
  • branches/3.7/src/wp-includes/version.php

    r25982 r26450  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 25824;
     14$wp_db_version = 26148;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.