function security_review_get_stored_results in Security Review 7
Retrieve stored checks and results.
Return value
array Array of checks with keys: namespace - string Check namespace reviewcheck - string Check name result - bool Whether check passed or not lastrun - UNIX timestamp of last time check ran skip - bool Whether check is being skipped or not skiptime - UNIX timestamp of when check was skipped, if set skipuid - UID of user who skipped the check, if set
4 calls to security_review_get_stored_results()
- security_review_drush in ./
security_review.drush.inc - Run checklist and display results command.
- security_review_page in ./
security_review.pages.inc - Page callback for run & review.
- security_review_requirements in ./
security_review.install - Implements hook_requirements().
- security_review_settings in ./
security_review.pages.inc - Module settings form.
File
- ./
security_review.module, line 104 - Site security review and reporting Drupal module.
Code
function security_review_get_stored_results() {
$checks = array();
// Retrieve results from last run of the checklist.
$result = db_query("SELECT namespace, reviewcheck, result, lastrun, skip, skiptime, skipuid FROM {security_review}");
foreach ($result as $record) {
$checks[] = array(
'namespace' => $record->namespace,
'reviewcheck' => $record->reviewcheck,
'result' => $record->result == '1' ? TRUE : FALSE,
'lastrun' => $record->lastrun,
'skip' => $record->skip == '1' ? TRUE : FALSE,
'skiptime' => $record->skiptime,
'skipuid' => $record->skipuid,
);
}
return $checks;
}