Changeset 1646 for trunk


Ignore:
Timestamp:
Dec 9, 2006, 9:57:43 AM (18 years ago)
Author:
vdigital
Message:

0000597: Unvalidated comments are displayed on public side

Just add a comment filter to avoid showing unvalidated comment to non admin people.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/comments.php

    r1617 r1646  
    300300}
    301301
     302// Comments_validation is required and is not admin => Only validated
     303$comment_fltr = '';
     304if ( $conf['comments_validation'] and !is_admin() )
     305{
     306  $comment_fltr = 'AND com.validated = \'true\'';
     307}
     308
    302309$query = '
    303310SELECT COUNT(DISTINCT(id))
     
    309316    AND '.$page['author_clause'].'
    310317    AND '.$page['keyword_clause'].'
     318    '.$comment_fltr.'
    311319    AND '.$page['status_clause'];
    312320if ($user['forbidden_categories'] != '')
     
    355363    AND '.$page['author_clause'].'
    356364    AND '.$page['keyword_clause'].'
     365    '.$comment_fltr.'
    357366    AND '.$page['status_clause'];
    358367if ($user['forbidden_categories'] != '')
Note: See TracChangeset for help on using the changeset viewer.