updated context, metatag, imagestyleflush, browscap

This commit is contained in:
Bachir Soussi Chiadmi
2016-11-05 16:43:45 +01:00
parent 7aeabebddf
commit 3413d81bb8
187 changed files with 14704 additions and 1871 deletions

View File

@@ -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;
}
/**