diff --git a/memcache.install b/memcache.install index 57b441116a35a3c82ef28259d8d09dfc7b4d40b7..1da29bec6bcb6bc929a86ed9ac0ab5a3b5f5b16f 100644 --- a/memcache.install +++ b/memcache.install @@ -2,7 +2,7 @@ // $Id$ /** - * Add serialized field to cache tables + * Add serialized field to cache tables. */ function memcache_install() { switch ($GLOBALS['db_type']) { diff --git a/memcache.module b/memcache.module index c9c3e12a1ff98d34ace77c11ccbde8f0682b1371..5253f9bfa29dd3ce6fccd2dbc59da04129bb512a 100644 --- a/memcache.module +++ b/memcache.module @@ -11,6 +11,9 @@ function memcache_init() { } } +function memcache_perm() { + return array('access memcache statistics'); +} /** * See memcache_init() which registers this function as a shutdown function. @@ -29,7 +32,7 @@ function memcache_shutdown() { } } - if ($user->uid == 1) { + if (user_access('access memcache statistics')) { $stats = array(); foreach ($_memcache_statistics as $stat => $val) { $stats[] = "$stat: ". theme('item_list', $val);