mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
Merge pull request #33 from phalkunz/master
FIX: Fix an issue where migration process ignores setting the Moderated flag
This commit is contained in:
commit
86d417bff0
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user