You are here

function hosting_cron_node_view in Hosting 7.4

Same name and namespace in other branches
  1. 7.3 cron/hosting_cron.module \hosting_cron_node_view()

Implements hook_node_view().

File

cron/hosting_cron.module, line 89
Allow the hosting system to cron all the installed sites on a schedule.

Code

function hosting_cron_node_view($node, $view_mode, $langcode) {
  if ($node->type == 'site') {
    if ($view_mode != 'teaser') {

      // @todo : turn it into x minutes ago
      $node->content['info']['last_cron'] = array(
        '#type' => 'item',
        '#title' => t('Cron run'),
        '#weight' => 20,
        '#markup' => hosting_format_interval($node->last_cron),
      );
    }
  }
}