mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 01:42:29 +02:00
bug 2323 : Refactoring update_user_comment() function to use user_comment_check trigger in a better place.
git-svn-id: http://piwigo.org/svn/trunk@11253 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -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.'
|
||||
|
||||
Reference in New Issue
Block a user