FIX Ensures old blog 1.0 style author names are migrated into 2.0 AuthorNames

Found that old 1.0 blog author names were not being migrated over to the new 2.0 AuthorNames (noted that there is now also a relationship between Member and BlogPost). The old 1.0 did not have this relationship so when migrating no authors are brought across from BlogEntry into BlogPost during the MigrationTask.
This commit is contained in:
Cam Findlay 2015-06-07 17:20:13 +12:00
parent 4b16f2c2ac
commit 6ccb1bb5df

View File

@ -49,6 +49,7 @@ class BlogEntry extends BlogPost implements MigratableObject {
} }
$this->PublishDate = $this->Date; $this->PublishDate = $this->Date;
$this->AuthorNames = $this->Author;
// If a user has subclassed BlogEntry, it should not be turned into a BlogPost. // If a user has subclassed BlogEntry, it should not be turned into a BlogPost.
if($this->ClassName === 'BlogEntry') { if($this->ClassName === 'BlogEntry') {