includes/template.php
changeset 1173 b5b8e7ab0914
parent 1132 05fe0039d952
child 1192 5882f0eebb34
--- a/includes/template.php	Fri Dec 18 05:05:01 2009 -0500
+++ b/includes/template.php	Fri Dec 18 05:12:02 2009 -0500
@@ -829,7 +829,9 @@
             COMMENT_UNAPPROVED => $cdata['comments_unapproved'],
             COMMENT_SPAM => $cdata['comments_spam']
           );
-        $num_comments = array_sum($approval_counts);
+        $num_comments = $session->check_acl_scope('mod_comments', $this->namespace) && $this->page->perms->get_permissions('mod_comments')
+                          ? array_sum($approval_counts)
+                          : $approval_counts[COMMENT_APPROVED];
       }
       else
       {