function seckit_requirements in Security Kit 7
Implements hook_requirements().
File
- ./
seckit.install, line 34 - Install/update/uninstall actions for SecKit.
Code
function seckit_requirements($phase) {
$requirements = array();
// Ensure translations don't break during installation.
$t = get_t();
if ($phase == 'runtime') {
$options = _seckit_get_options();
$csp_options = $options['seckit_xss']['csp'];
if ($csp_options['report-only']) {
$requirements['seckit'] = array(
'title' => $t('Security Kit'),
'value' => $t("Content Security Policy (CSP) is in 'report only' mode. Policy violations will <em>not</em> be blocked. !configure.", array(
'!configure' => l('Configure Security Kit', 'admin/config/system/seckit'),
)),
'severity' => REQUIREMENT_WARNING,
);
}
}
return $requirements;
}