WordPress.org

Make WordPress Core

Changeset 3635


Ignore:
Timestamp:
03/07/2006 10:34:05 PM (12 years ago)
Author:
ryan
Message:

Cron fixes from masquerade. #2425

Location:
trunk
Files:
3 edited

Legend:

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

    r3604 r3635  
    366366        if ( !empty($posts) )
    367367            foreach ( $posts as $post )
    368                 wp_schedule_event(mysql2date('U', $post->post_date), 'once', 'publish_future_post', $post->ID);
     368                wp_schedule_single_event(mysql2date('U', $post->post_date), 'publish_future_post', $post->ID);
    369369    }
    370370    if ( $wp_current_db_version < 3570 ) {
  • trunk/wp-includes/cron.php

    r3634 r3635  
    77    update_option('cron', $crons);
    88}
    9 function wp_schedule_new_event($timestamp, $recurrence, $hook) {
     9function wp_schedule_event($timestamp, $recurrence, $hook) {
    1010    $args = array_slice(func_get_args(), 3);
    1111    $crons = get_option('cron');
     
    3838        $timestamp += $interval;
    3939    }
    40     wp_schedule_new_event($timestamp, $recurrence, $hook);
     40    wp_schedule_event($timestamp, $recurrence, $hook);
    4141}
    4242
     
    6767function spawn_cron() {
    6868    if (array_shift(array_keys(get_option('cron'))) > time()) return;
    69 
    70     //Since execute pings had CGI problems, but I'd like to test this without this code first
    71     // It seems to be working on CGI here, please report if you have issues
    72 /*  if ( substr(php_sapi_name(), 0, 3) == 'cgi' ) {
    73         echo '<iframe src="' . $cron_url . '"></iframe>';
    74     }*/
    7569   
    7670    $cron_url = get_settings('siteurl') . '/wp-cron.php';
  • trunk/wp-includes/default-filters.php

    r3577 r3635  
    8787add_action('publish_future_post', 'wp_publish_post', 10, 1);
    8888add_action('wp_head', 'noindex', 1);
    89 add_action('init', 'wp_cron');
     89if(!defined('DOING_CRON'))
     90    add_action('init', 'wp_cron');
    9091?>
Note: See TracChangeset for help on using the changeset viewer.