function advuser_requirements in Advanced User 6.3
Same name and namespace in other branches
- 7.3 advuser.install \advuser_requirements()
Implementation of hook_requirements().
File
- ./
advuser.install, line 40
Code
function advuser_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time
$t = get_t();
if ($phase == 'runtime') {
/**
* This check is important to catch updates from previous versions the
* Token module wasn't yet a dependency.
*/
if (!module_exists('token')) {
$requirements['advuser_token'] = array(
'title' => $t('!module module', array(
'!module' => $t('Token'),
)),
'value' => $t('Disabled'),
'severity' => REQUIREMENT_ERROR,
'description' => $t('Since version 6.x-3.x the !this_module module needs the !token module for token substitution. Please install and enable it.', array(
'!token' => l($t('Token'), 'http://drupal.org/project/token'),
'!this_module' => $t('Advanced User'),
)),
);
}
}
return $requirements;
}