Commit c07ba2a8 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#212813 by dww: link project status information to the admin/reports/updates page (usability)

parent ba5468e5
......@@ -253,29 +253,30 @@ function _update_requirement_check($project, $type) {
}
switch ($status) {
case UPDATE_NOT_SECURE:
$requirement['value'] = t('Not secure!');
$requirement_label = t('Not secure!');
break;
case UPDATE_REVOKED:
$requirement['value'] = t('Revoked!');
$requirement_label = t('Revoked!');
break;
case UPDATE_NOT_SUPPORTED:
$requirement['value'] = t('Unsupported release');
$requirement_label = t('Unsupported release');
break;
case UPDATE_NOT_CURRENT:
$requirement['value'] = t('Out of date');
$requirement_label = t('Out of date');
$requirement['severity'] = variable_get('update_notification_threshold', 'all') == 'all' ? REQUIREMENT_ERROR : REQUIREMENT_WARNING;
break;
case UPDATE_UNKNOWN:
case UPDATE_NOT_CHECKED:
$requirement['value'] = isset($project['reason']) ? $project['reason'] : t('Can not determine status');
$requirement_label = isset($project['reason']) ? $project['reason'] : t('Can not determine status');
$requirement['severity'] = REQUIREMENT_WARNING;
break;
default:
$requirement['value'] = t('Up to date');
$requirement_label = t('Up to date');
}
if ($status != UPDATE_CURRENT && $type == 'core' && isset($project['recommended'])) {
$requirement['value'] .= ' '. t('(version @version available)', array('@version' => $project['recommended']));
$requirement_label .= ' '. t('(version @version available)', array('@version' => $project['recommended']));
}
$requirement['value'] = l($requirement_label, 'admin/reports/updates');
return $requirement;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment