You are here

function memcache_admin_requirements in Memcache API and Integration 5

Same name and namespace in other branches
  1. 6 memcache_admin/memcache_admin.install \memcache_admin_requirements()
  2. 7 memcache_admin/memcache_admin.install \memcache_admin_requirements()

File

memcache_admin/memcache_admin.install, line 3

Code

function memcache_admin_requirements($phase) {
  $requirements = array();

  // Ensure translations don't break at install time
  $t = get_t();
  $stats_exists = function_exists('dmemcache_stats');
  $requirements['memcache_admin'] = array(
    'title' => $t('Memcache admin'),
    'value' => $stats_exists ? t('Memcache included') : t('Memcache not included'),
    'severity' => $stats_exists ? REQUIREMENT_OK : REQUIREMENT_ERROR,
    'description' => $stats_exists ? '' : $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', NULL, NULL, TRUE),
    )),
  );
  return $requirements;
}