function security_review_run in Security Review 6
Same name and namespace in other branches
- 7 security_review.inc \security_review_run()
Public function for running Security Review checklist and returning results.
Parameters
array $checklist Array of checks to run, indexed by module namespace.:
boolean $log Whether to log check processing using security_review_log.:
boolean $help Whether to load the help file and include in results.:
Return value
array Results from running checklist, indexed by module namespace.
1 call to security_review_run()
- security_review_drush in ./
security_review.drush.inc - Run checklist and display results command.
File
- ./
security_review.inc, line 19 - Stand-alone security checks and review system.
Code
function security_review_run($checklist = NULL, $log = FALSE, $help = FALSE) {
if (!$checklist && module_exists('security_review')) {
$checklist = module_invoke_all('security_checks');
}
$results = _security_review_run($checklist, $log);
// Fill out the descriptions of the results if $help is requested.
if ($help && module_exists('security_review') && module_load_include('inc', 'security_review', 'security_review.help')) {
foreach ($results as $module => $checks) {
foreach ($checks as $check_name => $check) {
$function = $check['callback'] . '_help';
// We should have loaded all necessary include files.
if (function_exists($function)) {
$element = call_user_func($function, $check);
// @todo run through theme?
$results[$module][$check_name]['help'] = $element;
}
}
}
}
return $results;
}