Ticket #7068: 7068_cron.diff
File 7068_cron.diff, 1.6 KB (added by , 17 years ago) |
---|
-
C:/xampp/htdocs/wordpress_trunk/wp-cron.php
22 22 23 23 if ( $_GET['check'] != wp_hash('187425') ) 24 24 exit; 25 26 $local_time = time(); 25 27 26 if ( get_option('doing_cron') > time() ) 27 exit;28 $crons = _get_cron_array(); 29 $keys = array_keys( $crons ); 28 30 29 update_option('doing_cron', time() + 30); 30 31 $crons = _get_cron_array(); 32 $keys = array_keys($crons); 33 if (!is_array($crons) || $keys[0] > time()) 31 if (!is_array($crons) || $keys[0] > $local_time) { 32 update_option('doing_cron', 0); 34 33 return; 34 } 35 35 36 foreach ($crons as $timestamp => $cronhooks) { 37 if ($timestamp > time()) break; 36 foreach ($crons as $timestamp => $cronhooks) { 37 38 if ( $timestamp > $local_time ) 39 break; 40 38 41 foreach ($cronhooks as $hook => $keys) { 39 foreach ($keys as $key => $args) { 40 $schedule = $args['schedule']; 42 43 foreach ($keys as $k => $v) { 44 45 $schedule = $v['schedule']; 46 41 47 if ($schedule != false) { 42 $new_args = array($timestamp, $schedule, $hook, $ args['args']);48 $new_args = array($timestamp, $schedule, $hook, $v['args']); 43 49 call_user_func_array('wp_reschedule_event', $new_args); 44 50 } 45 wp_unschedule_event($timestamp, $hook, $args['args']); 46 do_action_ref_array($hook, $args['args']); 51 52 wp_unschedule_event($timestamp, $hook, $v['args']); 53 54 do_action_ref_array($hook, $v['args']); 47 55 } 48 56 } 49 57 } 50 58 51 59 update_option('doing_cron', 0); 52 60 53 ?> 54 No newline at end of file 61 die(); 62 63 ?>