Index: statistics.module =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics.module,v retrieving revision 1.196 diff -u -p -r1.196 statistics.module --- statistics.module 7 Jun 2005 18:54:37 -0000 1.196 +++ statistics.module 9 Jun 2005 17:13:10 -0000 @@ -82,7 +82,7 @@ function statistics_exit() { * Implementation of hook_perm(). */ function statistics_perm() { - return array('access statistics'); + return array('access statistics', 'access statistics counter'); } /** @@ -90,15 +90,15 @@ function statistics_perm() { */ function statistics_link($type, $node = 0, $main = 0) { global $id; - $links = array(); - - if ($type != 'comment' && variable_get('statistics_display_counter', 0)) { + + if ($type != 'comment' && user_access('access statistics counter') && variable_get('statistics_display_counter', 0)) { $statistics = statistics_get($node->nid); if ($statistics) { $links[] = format_plural($statistics['totalcount'], '1 read', '%count reads'); } } + return $links; }