From 1eefab0cfa804dd2596dc7cb81751fb77cbc3742 Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Sat, 17 Mar 2012 12:21:58 +1300 Subject: [PATCH] BUGFIX Force the migrated comment to be inserted into the database. --- code/dataobjects/Comment.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/dataobjects/Comment.php b/code/dataobjects/Comment.php index a1cd476..0641d38 100755 --- a/code/dataobjects/Comment.php +++ b/code/dataobjects/Comment.php @@ -47,7 +47,8 @@ class Comment extends DataObject { if($comments) { while($pageComment = $comments->nextRecord()) { // create a new comment from the older page comment - $comment = new Comment($pageComment); + $comment = new Comment(); + $comment->update($pageComment); // set the variables which have changed $comment->BaseClass = 'SiteTree'; @@ -244,4 +245,4 @@ class Comment extends DataObject { $this->Parent()->Title ); } -} \ No newline at end of file +}