BUGFIX: fixed spam not being turned into ham if spamprotection isnt enabled. PATCH via simon_w #4813

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@94571 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Will Rossiter 2009-12-08 01:50:35 +00:00 committed by Sam Minnee
parent 0e65de67f8
commit 7d48f2c1c8

View File

@ -259,8 +259,6 @@ class PageComment_Controller extends Controller {
// if spam protection module exists // if spam protection module exists
if(class_exists('SpamProtectorManager')) { if(class_exists('SpamProtectorManager')) {
SpamProtectorManager::send_feedback($comment, 'ham'); SpamProtectorManager::send_feedback($comment, 'ham');
$comment->setField('IsSpam', false);
$comment->write();
} }
if(SSAkismet::isEnabled()) { if(SSAkismet::isEnabled()) {
@ -272,11 +270,11 @@ class PageComment_Controller extends Controller {
} catch (Exception $e) { } catch (Exception $e) {
// Akismet didn't work, most likely the service is down. // Akismet didn't work, most likely the service is down.
} }
}
$comment->setField('IsSpam', false); $comment->setField('IsSpam', false);
$comment->write(); $comment->write();
} }
} }
}
if(Director::is_ajax()) { if(Director::is_ajax()) {
echo $comment->renderWith('PageCommentInterface_singlecomment'); echo $comment->renderWith('PageCommentInterface_singlecomment');
} else { } else {