function hosting_cron_nodeapi in Hosting 6.2
Same name and namespace in other branches
- 5 cron/hosting_cron.module \hosting_cron_nodeapi()
Implementation of hook_nodeapi().
File
- cron/
hosting_cron.module, line 66 - Allow the hosting system to cron all the installed sites on a schedule.
Code
function hosting_cron_nodeapi(&$node, $op, $a3 = null) {
if ($node->type == 'site') {
switch ($op) {
case 'view':
if (!$a3) {
// @todo : turn it into x minutes ago
$node->content['info']['last_cron'] = array(
'#type' => 'item',
'#title' => t('Cron run'),
'#weight' => 20,
'#value' => hosting_format_interval($node->last_cron),
);
}
break;
}
}
}