Merge pull request #33 from phalkunz/master

FIX: Fix an issue where migration process ignores setting the Moderated flag
This commit is contained in:
Will Rossiter 2012-08-01 21:00:14 -07:00
commit 86d417bff0

View File

@ -75,6 +75,7 @@ class Comment extends DataObject {
// set the variables which have changed // set the variables which have changed
$comment->BaseClass = 'SiteTree'; $comment->BaseClass = 'SiteTree';
$comment->URL = (isset($pageComment['CommenterURL'])) ? $pageComment['CommenterURL'] : ""; $comment->URL = (isset($pageComment['CommenterURL'])) ? $pageComment['CommenterURL'] : "";
if((int)$pageComment['NeedsModeration'] == 0) $comment->Moderated = true;
$comment->write(); $comment->write();
} }