function browscap_requirements in Browscap 7.2
Implements hook_requirements().
File
- ./
browscap.install, line 34 - Install, update and uninstall functions for the Browscap module.
Code
function browscap_requirements($phase) {
$requirements = array();
$t = get_t();
if ($phase == 'runtime' && user_access('administer browscap')) {
$requirement = array(
'value' => variable_get('browscap_version', 0) === 0 ? $t('Not installed') : l(variable_get('browscap_version', 0), 'admin/config/system/browscap'),
'title' => $t('Browscap version'),
);
if (variable_get('browscap_version', 0) === 0) {
$requirement += array(
'severity' => REQUIREMENT_ERROR,
'description' => $t('Browscap data is not imported! See <a href="!settings_url">Browscap settings</a> to import manually.', array(
'!settings_url' => url('admin/config/system/browscap'),
)),
);
}
else {
$requirement += array(
'severity' => REQUIREMENT_OK,
);
}
$requirements['browscap_version'] = $requirement;
}
return $requirements;
}