| 1 |
<?php |
<?php |
| 2 |
// $Id: poormanscron.module,v 1.22.2.2 2009/09/29 22:36:15 davereid Exp $ $Name: $ |
// $Id: poormanscron.module,v 1.22.2.3 2009/09/29 22:59:33 davereid Exp $ $Name: $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
/** |
/** |
| 10 |
* Implementation of hook_menu(). |
* Implement hook_menu(). |
| 11 |
*/ |
*/ |
| 12 |
function poormanscron_menu() { |
function poormanscron_menu() { |
| 13 |
$items['poormanscron/run-cron-check'] = array( |
$items['poormanscron/run-cron-check'] = array( |
| 20 |
} |
} |
| 21 |
|
|
| 22 |
/** |
/** |
| 23 |
* Implementation of hook_init(). |
* Implement hook_init(). |
| 24 |
*/ |
*/ |
| 25 |
function poormanscron_init() { |
function poormanscron_init() { |
| 26 |
if (poormanscron_run_cron_check_access()) { |
if (poormanscron_run_cron_check_access()) { |
| 91 |
} |
} |
| 92 |
|
|
| 93 |
/** |
/** |
| 94 |
* Implementation of hook_form_FORM_ID_alter(). |
* Implement hook_form_FORM_ID_alter(). |
| 95 |
*/ |
*/ |
| 96 |
function poormanscron_form_system_site_information_settings_alter(&$form, &$form_state) { |
function poormanscron_form_system_site_information_settings_alter(&$form, &$form_state) { |
| 97 |
$form['cron_safe_threshold'] = array( |
$form['cron_safe_threshold'] = array( |
| 101 |
'#options' => array(0 => t('Never')) + drupal_map_assoc(array(3600, 10800, 21600, 43200, 86400, 604800), 'format_interval'), |
'#options' => array(0 => t('Never')) + drupal_map_assoc(array(3600, 10800, 21600, 43200, 86400, 604800), 'format_interval'), |
| 102 |
'#description' => t('When enabled, the site will check whether cron has been run in the configured interval and automatically run it upon the next page request. For more information visit the <a href="@status-report-url">status report page</a>.', array('@status-report-url' => url('admin/reports/status'))), |
'#description' => t('When enabled, the site will check whether cron has been run in the configured interval and automatically run it upon the next page request. For more information visit the <a href="@status-report-url">status report page</a>.', array('@status-report-url' => url('admin/reports/status'))), |
| 103 |
); |
); |
| 104 |
$form['buttons'] += array('#weight' => 30); |
$form['buttons'] += array('#weight' => 100); |
| 105 |
} |
} |