function memcache_admin_requirements in Memcache API and Integration 6
Same name and namespace in other branches
- 5 memcache_admin/memcache_admin.install \memcache_admin_requirements()
- 7 memcache_admin/memcache_admin.install \memcache_admin_requirements()
Implementation of hook_requirements().
File
- memcache_admin/
memcache_admin.install, line 11 - Install, update and uninstall functions for the memcache_admin module.
Code
function memcache_admin_requirements($phase) {
$t = get_t();
$requirements = array();
if ($phase == 'runtime') {
$requirements['memcache_admin']['title'] = $t('Memcache admin');
if (function_exists('dmemcache_stats')) {
$requirements['memcache_admin']['value'] = $t('Memcache included');
$requirements['memcache_admin']['severity'] = REQUIREMENT_OK;
}
else {
$requirements['memcache_admin']['value'] = $t('Memcache not included');
$requirements['memcache_admin']['description'] = $t('Memcache admin requires that the "cache_inc" $conf variable be set to include either memcache.inc or memcache.db.inc. Please read the !instructions.', array(
'!instructions' => l($t('installation instructions'), 'http://drupal.org/project/memcache'),
));
$requirements['memcache_admin']['severity'] = REQUIREMENT_ERROR;
}
}
return $requirements;
}