Fixed access type warning in discussion button generation in template
authorDan
Mon, 16 Jun 2008 19:20:13 -0400
changeset 579 6e23d8a99616
parent 578 02bc119a6dd3
child 580 41c45314ac27
Fixed access type warning in discussion button generation in template
includes/template.php
--- a/includes/template.php	Mon Jun 16 19:16:12 2008 -0400
+++ b/includes/template.php	Mon Jun 16 19:20:13 2008 -0400
@@ -602,8 +602,8 @@
       }
       
       $db->free_result();
-      $n = ( $perms->get_permissions('mod_comments') ) ? (string)$nc : (string)$na;
-      if ( $perms->get_permissions('mod_comments') && $nu > 0 )
+      $n = ( $session->check_acl_scope('mod_comments', $local_namespace) && $perms->get_permissions('mod_comments') ) ? (string)$nc : (string)$na;
+      if ( $session->check_acl_scope('mod_comments', $local_namespace) && $perms->get_permissions('mod_comments') && $nu > 0 )
       {
         $subst = array(
             'num_comments' => $nc,