| 1 |
<?php |
<?php |
| 2 |
// $Id: cron.module,v 1.8 2009/06/15 11:18:03 denraf Exp $ |
// $Id: cron.module,v 1.9 2009/06/15 13:54:23 denraf Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 62 |
'page callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 63 |
'page arguments' => array('cron_settings_form'), |
'page arguments' => array('cron_settings_form'), |
| 64 |
'access arguments' => array('admin tools'), |
'access arguments' => array('admin tools'), |
| 65 |
'weight' => 2, |
'weight' => 3, |
| 66 |
'type' => MENU_LOCAL_TASK |
'type' => MENU_LOCAL_TASK |
| 67 |
); |
); |
| 68 |
return $items; |
return $items; |
| 70 |
|
|
| 71 |
function cron_list_form() { |
function cron_list_form() { |
| 72 |
|
|
|
if (($end = variable_get('cron_interval_end', 0)) && ($start = variable_get('cron_interval_start', 0))) { |
|
|
$form['interval'] = array( |
|
|
'#value' => t('The cron of this site runs every '.format_interval($end - $start)), |
|
|
); |
|
|
} |
|
|
|
|
| 73 |
$header = array( |
$header = array( |
| 74 |
t('Site'), |
t('Site'), |
| 75 |
t('Cron key (Drupal 7)'), |
t('Cron key (Drupal 7)'), |
| 333 |
drupal_goto('admin/settings/tools/cron/settings'); |
drupal_goto('admin/settings/tools/cron/settings'); |
| 334 |
} |
} |
| 335 |
} |
} |
| 336 |
|
|
| 337 |
|
/** |
| 338 |
|
* Implementation of hook_help(). |
| 339 |
|
*/ |
| 340 |
|
function cron_help($path, $arg) { |
| 341 |
|
|
| 342 |
|
switch ($path) { |
| 343 |
|
case 'admin/settings/tools/cron': |
| 344 |
|
if (($end = variable_get('cron_interval_end', 0)) && ($start = variable_get('cron_interval_start', 0))) { |
| 345 |
|
return '<p>'. t('The cron of this site runs every '.format_interval($end - $start)) .'</p>'; |
| 346 |
|
} |
| 347 |
|
} |
| 348 |
|
} |
| 349 |
|
|
| 350 |
/** |
/** |
| 351 |
* Implementation of hook_theme(). |
* Implementation of hook_theme(). |