updated context, metatag, imagestyleflush, browscap
This commit is contained in:
@@ -29,14 +29,34 @@ function browscap_schema() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_install().
|
||||
* Implements hook_requirements().
|
||||
*/
|
||||
function browscap_install() {
|
||||
// Update the browscap information.
|
||||
_browscap_import();
|
||||
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'),
|
||||
);
|
||||
|
||||
// Record when the browscap information was updated.
|
||||
variable_set('browscap_imported', REQUEST_TIME);
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user