Make WordPress Core


Ignore:
Timestamp:
11/26/2008 11:48:05 AM (18 years ago)
Author:
ryan
Message:

If api.wp.org request blocks, make sure another requests isn't scheduled for 12 hours. see #8347

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/update.php

    r9793 r9901  
    3535        )
    3636                return false;
     37
     38        // Update last_checked for current to prevent multiple blocking requests if request hangs
     39        $current->last_checked = time();
     40        update_option( 'update_core', $current );
    3741
    3842        if ( method_exists( $wpdb, 'db_version' ) )
     
    139143                return false;
    140144
     145        // Update last_checked for current to prevent multiple blocking requests if request hangs
     146        $current->last_checked = time();
     147        update_option( 'update_plugins', $current );
     148
    141149        $to_send->plugins = $plugins;
    142150        $to_send->active = $active;
     
    197205        $new_option = '';
    198206        $new_option->last_checked = time( );
    199         $time_not_changed = isset( $current->last_checked ) && 43200 > ( time( ) - $current->last_checked );
     207        $time_not_changed = isset( $current_theme->last_checked ) && 43200 > ( time( ) - $current_theme->last_checked );
    200208
    201209        if( $time_not_changed )
    202210                return false;
     211
     212        // Update last_checked for current to prevent multiple blocking requests if request hangs
     213        $current_theme->last_checked = time();
     214        update_option( 'update_themes', $current_theme );
    203215
    204216        $themes = array( );
Note: See TracChangeset for help on using the changeset viewer.