diff options
Diffstat (limited to 'comments.php')
-rw-r--r-- | comments.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/comments.php b/comments.php index 4d9ca26db..9469cdf6a 100644 --- a/comments.php +++ b/comments.php @@ -299,6 +299,13 @@ else $start = 0; } +// Comments_validation is required and is not admin => Only validated +$comment_fltr = ''; +if ( $conf['comments_validation'] and !is_admin() ) +{ + $comment_fltr = 'AND com.validated = \'true\''; +} + $query = ' SELECT COUNT(DISTINCT(id)) FROM '.IMAGE_CATEGORY_TABLE.' AS ic @@ -308,6 +315,7 @@ SELECT COUNT(DISTINCT(id)) AND '.$page['cat_clause'].' AND '.$page['author_clause'].' AND '.$page['keyword_clause'].' + '.$comment_fltr.' AND '.$page['status_clause']; if ($user['forbidden_categories'] != '') { @@ -354,6 +362,7 @@ SELECT com.id AS comment_id AND '.$page['cat_clause'].' AND '.$page['author_clause'].' AND '.$page['keyword_clause'].' + '.$comment_fltr.' AND '.$page['status_clause']; if ($user['forbidden_categories'] != '') { |