| 1 |
<?php |
<?php |
| 2 |
/** |
/** |
| 3 |
* $Id: cronplus.module,v 1.8 2007/03/22 23:41:18 syscrusher Exp $ |
* $Id: cronplus.module,v 1.8.2.1 2008/12/19 04:14:21 syscrusher Exp $ |
| 4 |
* |
* |
| 5 |
* CronPlus enhances the Drupal cron feature to provide specific calls to |
* CronPlus enhances the Drupal cron feature to provide specific calls to |
| 6 |
* other modules at hourly, daily, weekly, monthly, and yearly intervals. |
* other modules at hourly, daily, weekly, monthly, and yearly intervals. |
| 22 |
/** |
/** |
| 23 |
* Implements hook_menu(). |
* Implements hook_menu(). |
| 24 |
*/ |
*/ |
| 25 |
function cronplus_menu($may_cache) { |
function cronplus_menu() { |
| 26 |
$items = array(); |
$items = array(); |
| 27 |
if ($may_cache) { |
$items['admin/settings/cronplus'] = array( |
| 28 |
$items[] = array( |
'title' => t('cronplus'), |
| 29 |
'path' => 'admin/settings/cronplus', |
'page callback' => 'cronplus_settings_main', |
| 30 |
'title' => t('cronplus'), |
'description' => 'Select which hour and on what day you would like houly and daily crons to run. Also see the status of cronplus', |
| 31 |
'callback' => 'cronplus_settings_main', |
'access callback' => 'user_access', |
| 32 |
'description' => 'Select which hour and on what day you would like houly and daily crons to run. Also see the status of cronplus', |
'access arguments' => array('administer site configuration'), |
| 33 |
'access' => user_access('administer site configuration'), |
// 'type' => MENU_LOCAL_TASK, |
| 34 |
// 'type' => MENU_LOCAL_TASK, |
); |
| 35 |
); |
$items['admin/settings/cronplus/main'] = array( |
| 36 |
$items[] = array( |
'title' => t('configuration'), |
| 37 |
'path' => 'admin/settings/cronplus/main', |
'type' => MENU_DEFAULT_LOCAL_TASK, |
| 38 |
'title' => t('configuration'), |
'access callback' => 'user_access', |
| 39 |
'type' => MENU_DEFAULT_LOCAL_TASK, |
'access arguments' => array('administer site configuration'), |
| 40 |
'weight' => -10, |
'weight' => -10, |
| 41 |
); |
); |
| 42 |
} |
$items['admin/settings/cronplus/status'] = array( |
| 43 |
else { |
'title' => t('status report'), |
| 44 |
$items[] = array( |
'page callback' => 'cronplus_settings_status', 'access' => user_access('administer site configuration'), |
| 45 |
'path' => 'admin/settings/cronplus/status', |
'access callback' => 'user_access', |
| 46 |
'title' => t('status report'), |
'access arguments' => array('administer site configuration'), |
| 47 |
'callback' => 'cronplus_settings_status', 'access' => user_access('administer site configuration'), |
'type' => MENU_LOCAL_TASK, 'weight' => 10 |
| 48 |
'type' => MENU_LOCAL_TASK, 'weight' => 10); |
); |
|
} |
|
| 49 |
return $items; |
return $items; |
| 50 |
} |
} |
| 51 |
|
|
| 104 |
'#type' => 'submit', |
'#type' => 'submit', |
| 105 |
'#value' => t('Save settings'), |
'#value' => t('Save settings'), |
| 106 |
); |
); |
| 107 |
return $form; |
return system_settings_form($form); |
| 108 |
} |
} |
| 109 |
|
|
| 110 |
/** |
/** |