equal
deleted
inserted
replaced
827 $approval_counts = array( |
827 $approval_counts = array( |
828 COMMENT_APPROVED => $cdata['comments_approved'], |
828 COMMENT_APPROVED => $cdata['comments_approved'], |
829 COMMENT_UNAPPROVED => $cdata['comments_unapproved'], |
829 COMMENT_UNAPPROVED => $cdata['comments_unapproved'], |
830 COMMENT_SPAM => $cdata['comments_spam'] |
830 COMMENT_SPAM => $cdata['comments_spam'] |
831 ); |
831 ); |
832 $num_comments = array_sum($approval_counts); |
832 $num_comments = $session->check_acl_scope('mod_comments', $this->namespace) && $this->page->perms->get_permissions('mod_comments') |
|
833 ? array_sum($approval_counts) |
|
834 : $approval_counts[COMMENT_APPROVED]; |
833 } |
835 } |
834 else |
836 else |
835 { |
837 { |
836 $e = $db->sql_query('SELECT approved FROM '.table_prefix.'comments WHERE page_id=\''.$this->page_id.'\' AND namespace=\''.$this->namespace.'\';'); |
838 $e = $db->sql_query('SELECT approved FROM '.table_prefix.'comments WHERE page_id=\''.$this->page_id.'\' AND namespace=\''.$this->namespace.'\';'); |
837 if ( !$e ) |
839 if ( !$e ) |