Ticket #2425: 2425.diff
File 2425.diff, 1.6 KB (added by , 19 years ago) |
---|
-
wp-includes/cron.php
49 49 } 50 50 51 51 function wp_clear_scheduled_hook($hook) { 52 while($timestamp = next_scheduled($hook))52 while($timestamp = wp_next_scheduled($hook)) 53 53 wp_unschedule_event($timestamp, $hook); 54 54 } 55 55 … … 72 72 73 73 $argyle = @ fsockopen($parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01); 74 74 if ( $argyle ) 75 fputs($argyle, "GET {$parts['path']}?time=" . time() . '&check=' 76 . md5(DB_PASS . '187425') . " HTTP/1.0\r\nHost: {$_SERVER['HTTP_HOST']}\r\n\r\n"); 75 fputs($argyle, 76 "GET {$parts['path']}?check=" . md5(DB_PASS . '187425') . " HTTP/1.0\r\n" 77 . "Host: {$_SERVER['HTTP_HOST']}\r\n\r\n" 78 ); 77 79 } 78 80 79 81 function wp_cron() { … … 100 102 ); 101 103 return array_merge(apply_filters('cron_schedules', array()), $schedules); 102 104 } 103 ?> 104 No newline at end of file 105 ?> -
wp-cron.php
3 3 define('DOING_CRON', TRUE); 4 4 require_once('wp-config.php'); 5 5 6 if ( $_GET['check'] != md5(DB_PASS . '187425') ) 7 exit; 8 6 9 $crons = get_option('cron'); 7 10 if (!is_array($crons) || array_shift(array_keys($crons)) > time()) 8 11 return; … … 12 15 do_action($hook, $args['args']); 13 16 $schedule = $args['schedule']; 14 17 if($schedule != false) { 15 fwrite($fp, var_export($schedules[$schedule]));16 18 $args = array_merge( array($timestamp, $schedule, $hook), $args['args']); 17 19 call_user_func_array('wp_reschedule_event', $args); 18 20 }