From 6eccca879c4653c8a8a692ef26430165b4bf572a Mon Sep 17 00:00:00 2001 From: Saophalkun Ponlu Date: Wed, 1 Aug 2012 14:09:05 +1200 Subject: [PATCH] FIX: Fix an issue where migration process ignores setting the Moderated flag --- code/dataobjects/Comment.php | 1 + 1 file changed, 1 insertion(+) diff --git a/code/dataobjects/Comment.php b/code/dataobjects/Comment.php index 40a72e0..d2cad8a 100755 --- a/code/dataobjects/Comment.php +++ b/code/dataobjects/Comment.php @@ -75,6 +75,7 @@ class Comment extends DataObject { // set the variables which have changed $comment->BaseClass = 'SiteTree'; $comment->URL = (isset($pageComment['CommenterURL'])) ? $pageComment['CommenterURL'] : ""; + if((int)$pageComment['NeedsModeration'] == 0) $comment->Moderated = true; $comment->write(); }