FIX: Fix an issue where migration process ignores setting the Moderated flag

This commit is contained in:
Saophalkun Ponlu 2012-08-01 14:09:05 +12:00
parent 6d3597095f
commit 6eccca879c
1 changed files with 1 additions and 0 deletions

View File

@ -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();
}