function glossary_requirements in Glossary 6
Same name and namespace in other branches
- 5.2 glossary.install \glossary_requirements()
- 7 glossary.install \glossary_requirements()
Implementation of hook_requirements().
File
- ./
glossary.install, line 61 - Glossary module installation functions.
Code
function glossary_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time
$t = get_t();
// check that php is compiled with ctype support
$requirements['ctype'] = array(
'title' => $t('Character type functions (ctype)'),
);
if (function_exists('ctype_alnum')) {
$requirements['ctype']['value'] = $t('Enabled');
$requirements['ctype']['severity'] = REQUIREMENT_OK;
}
else {
$requirements['ctype']['value'] = $t('Disabled');
$requirements['ctype']['description'] = $t('The Glossary module requires that you configure PHP with --enable-ctype.');
$requirements['ctype']['severity'] = REQUIREMENT_ERROR;
}
return $requirements;
}