diff options
author | Eric <eric@piwigo.org> | 2011-06-07 15:56:34 +0000 |
---|---|---|
committer | Eric <eric@piwigo.org> | 2011-06-07 15:56:34 +0000 |
commit | aedc3508d835af611c2b6a3298cf8917bfa176c3 (patch) | |
tree | f809650120fe0b23cc7cb3ef82c77dc9c6fae345 /include/functions_comment.inc.php | |
parent | 24139d6e59b9f4ac321dc9ae978007f158b2ad01 (diff) |
r11253 merged from trunk - Tests are OK
bug 2323 fixed : Refactoring update_user_comment() function to use user_comment_check trigger in a better place.
git-svn-id: http://piwigo.org/svn/branches/2.2@11257 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_comment.inc.php')
-rw-r--r-- | include/functions_comment.inc.php | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/include/functions_comment.inc.php b/include/functions_comment.inc.php index 932491520..b2a4547d1 100644 --- a/include/functions_comment.inc.php +++ b/include/functions_comment.inc.php @@ -245,6 +245,14 @@ function update_user_comment($comment, $post_key) { $comment_action='reject'; } + elseif (!$conf['comments_validation'] or is_admin()) // should the updated comment must be validated + { + $comment_action='validate'; //one of validate, moderate, reject + } + else + { + $comment_action='moderate'; //one of validate, moderate, reject + } // perform more spam check $comment_action = @@ -263,16 +271,6 @@ function update_user_comment($comment, $post_key) $user_where_clause = ' AND author_id = \''. $GLOBALS['user']['id'].'\''; } - - // should the updated comment must be validated - if (!$conf['comments_validation'] or is_admin()) - { - $comment_action='validate'; //one of validate, moderate, reject - } - else - { - $comment_action='moderate'; //one of validate, moderate, reject - } $query = ' UPDATE '.COMMENTS_TABLE.' |