function security_review_reviewed in Security Review 6
Same name and namespace in other branches
- 7 security_review.pages.inc \security_review_reviewed()
1 call to security_review_reviewed()
- security_review_page in ./
security_review.module - Page callback for run & review.
File
- ./
security_review.module, line 169 - Site security review and reporting Drupal module.
Code
function security_review_reviewed($checklist, $checks, $namespace = NULL) {
$output = '';
$header = t('Review results from last run');
$desc = t("Here you can review the results from the last run of the checklist. Checks are not always perfectly correct in their procedure and result. You can keep a check from running by clicking the 'Skip' link beside it. You can run the checklist again by expanding the fieldset above.");
foreach ($checks as $check) {
$message = $check['result'] ? $checklist[$check['namespace']][$check['reviewcheck']]['success'] : $checklist[$check['namespace']][$check['reviewcheck']]['failure'];
$class = $check['skip'] ? 'info' : ($check['result'] ? 'ok' : 'error');
$toggle = $check['skip'] ? t('Enable') : t('Skip');
$token = drupal_get_token($check['reviewcheck']);
$link_options = array(
'query' => array(
'token' => $token,
),
'attributes' => array(
'class' => 'sec-rev-dyn',
),
);
$items[] = array(
'value' => $check['result'],
'class' => $class,
'message' => $message,
'help_link' => l(t('Details'), 'admin/reports/security-review/help/' . $check['namespace'] . '/' . $check['reviewcheck']),
'toggle_link' => l($toggle, 'admin/reports/security-review/toggle/' . $check['reviewcheck'], $link_options),
);
}
$output .= theme('security_review_reviewed', $items, $header, $desc);
return $output;
}