diff --git a/code/sitefeatures/PageComment.php b/code/sitefeatures/PageComment.php index e774d741..5b775e67 100755 --- a/code/sitefeatures/PageComment.php +++ b/code/sitefeatures/PageComment.php @@ -151,6 +151,10 @@ class PageComment extends DataObject { static function enableModeration() { self::$moderate = true; } + + static function moderationEnabled() { + return self::moderate; + } } ?> \ No newline at end of file diff --git a/code/sitefeatures/PageCommentInterface.php b/code/sitefeatures/PageCommentInterface.php index df565534..db8bda03 100755 --- a/code/sitefeatures/PageCommentInterface.php +++ b/code/sitefeatures/PageCommentInterface.php @@ -140,6 +140,8 @@ class PageCommentInterface_Form extends Form { $comment->IsSpam = false; $comment->write(); + $comment->NeedsModeration = PageComment::moderationEnable(); + if(Director::is_ajax()) { echo $comment->renderWith('PageCommentInterface_singlecomment'); } else {