diff --git a/code/sitefeatures/PageCommentInterface.php b/code/sitefeatures/PageCommentInterface.php index db8bda03..8de0bdc6 100755 --- a/code/sitefeatures/PageCommentInterface.php +++ b/code/sitefeatures/PageCommentInterface.php @@ -120,7 +120,11 @@ class PageCommentInterface_Form extends Form { //check if spam question was right. if(MathSpamProtection::isEnabled()){ if(!MathSpamProtection::correctAnswer($data['Math'])){ - echo "

You got the spam protection question wrong.

"; + if(Director::is_ajax()) { + echo "

You got the spam protection question wrong.

"; + } else { + Director::redirectBack(); + } return; } }