From 5ac94c6c2c3357dbf2f615c4f111a86074e7301f Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 16 Dec 2009 05:59:53 +0000 Subject: [PATCH] BUGFIX: fixed spam not being turned into ham if spamprotection isnt enabled. PATCH via simon_w #4813 (from r94571) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@95651 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/sitefeatures/PageComment.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/sitefeatures/PageComment.php b/code/sitefeatures/PageComment.php index 8f82c087..c80aa4c4 100755 --- a/code/sitefeatures/PageComment.php +++ b/code/sitefeatures/PageComment.php @@ -259,8 +259,6 @@ class PageComment_Controller extends Controller { // if spam protection module exists if(class_exists('SpamProtectorManager')) { SpamProtectorManager::send_feedback($comment, 'ham'); - $comment->setField('IsSpam', false); - $comment->write(); } if(SSAkismet::isEnabled()) { @@ -272,9 +270,9 @@ class PageComment_Controller extends Controller { } catch (Exception $e) { // Akismet didn't work, most likely the service is down. } - $comment->setField('IsSpam', false); - $comment->write(); } + $comment->setField('IsSpam', false); + $comment->write(); } } if(Director::is_ajax()) {