Merge pull request #259 from flashbackzoo/revert-256-pulls/fix-migration

Revert 256 pulls/fix migration
This commit is contained in:
Damian Mooyman 2015-05-26 12:59:29 +12:00
commit bfeddba670

View File

@ -50,9 +50,12 @@ class BlogEntry extends BlogPost implements MigratableObject {
$this->PublishDate = $this->Date;
$this->ClassName = 'BlogPost';
$this->RecordClassName = 'BlogPost';
// If a user has subclassed BlogEntry, it should not be turned into a BlogPost.
if($this->ClassName === 'BlogEntry') {
$this->ClassName = 'BlogPost';
$this->RecordClassName = 'BlogPost';
}
$this->write();
}