function semiclean_requirements in Semiclean 8
Same name and namespace in other branches
- 6 semiclean.module \semiclean_requirements()
- 7 semiclean.module \semiclean_requirements()
Implements hook_requirements().
File
- ./
semiclean.install, line 11 - Install file.
Code
function semiclean_requirements($phase) {
if ($phase == 'runtime') {
$requirements = array();
$requirements['semiclean']['title'] = t('Cron semaphore');
$cron_semaphore = variable_get('cron_semaphore', FALSE);
if ($cron_semaphore) {
$requirements['semiclean']['value'] = t('Cron started at @time', array(
'@time' => format_date($cron_semaphore, 'large'),
));
$requirements['semiclean']['severity'] = REQUIREMENT_WARNING;
$requirements['semiclean']['description'] = t("If it seems like cron has been running for too long, or is otherwise stuck, you might need to reset the semaphore. !clean_now", array(
'!clean_now' => l(t('Clean now!'), 'admin/reports/status/semiclean'),
));
}
else {
$requirements['semiclean']['value'] = t('Cron is not running');
$requirements['semiclean']['severity'] = REQUIREMENT_OK;
}
return $requirements;
}
}