You are here

function hosting_cron_nodeapi in Hostmaster (Aegir) 6

Implementation of hook_nodeapi().

File

modules/hosting/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;
    }
  }
}