You are here

function update_status_status in Update Status 5

Same name and namespace in other branches
  1. 5.2 update_status.module \update_status_status()

Menu callback. Generate a page of information about the update status of projects.

1 string reference to 'update_status_status'
update_status_menu in ./update_status.module
Implementation of hook_menu().

File

./update_status.module, line 94

Code

function update_status_status() {
  if (!function_exists('gzinflate')) {
    drupal_set_message(t('Your system needs the zlib extension for this module to work. See !link for more information.', array(
      '!link' => l('http://us.php.net/manual/en/ref.zlib.php', 'http://us.php.net/manual/en/ref.zlib.php', NULL, NULL, NULL, TRUE),
    )), 'error');
    return FALSE;
  }
  if ($info = variable_get('update_status', FALSE)) {
    $data = update_status_calculate_project_data($info);
    return theme('update_status_report', $data);
  }
  else {
    return theme('update_status_report', t('No update data is available. To fetch data, you may need to !run_cron.', array(
      '!run_cron' => l(t('run cron'), 'admin/logs/status/run-cron', NULL, 'destination=' . url('admin/logs/updates')),
    )));
  }
}