diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-03-29 18:48:41 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-03-29 18:48:41 +0000 |
commit | dd9d0beded1bd4629d42dfc19d9779c9e819104e (patch) | |
tree | 37258b996200aaf0692355b641d8f776a31871d9 /include/functions_comment.inc.php | |
parent | 37c072e07df697208af071345b25d12a719c1502 (diff) |
fix email on comment requiring validation even if the options is unchecked
git-svn-id: http://piwigo.org/svn/trunk@13800 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_comment.inc.php')
-rw-r--r-- | include/functions_comment.inc.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/functions_comment.inc.php b/include/functions_comment.inc.php index 5f29be76e..4c884794a 100644 --- a/include/functions_comment.inc.php +++ b/include/functions_comment.inc.php @@ -47,8 +47,10 @@ function user_comment_check($action, $comment) } if ( $link_count>$conf['comment_spam_max_links'] ) + { + $_POST['cr'][] = 'links'; return $my_action; - + } return $action; } @@ -122,6 +124,7 @@ SELECT COUNT(*) AS user_exists if ( !verify_ephemeral_key(@$key, $comm['image_id']) ) { $comment_action='reject'; + $_POST['cr'][] = 'key'; // rvelices: I use this outside to see how spam robots work } if ($comment_action!='reject' and $conf['anti-flood_time']>0 and !is_admin()) @@ -165,7 +168,7 @@ INSERT INTO '.COMMENTS_TABLE.' $comm['id'] = pwg_db_insert_id(COMMENTS_TABLE); - if ($conf['email_admin_on_comment'] + if ( ($conf['email_admin_on_comment'] && 'validate' == $comment_action) or ($conf['email_admin_on_comment_validation'] and 'moderate' == $comment_action)) { include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); |