BUG Fix BlogHolder::requireDefaultRecords not respecting SiteTree.create_default_pages config

This commit is contained in:
Damian Mooyman 2014-02-27 15:52:27 +13:00
parent 2a25b9459c
commit 5589def46d

View File

@ -120,7 +120,10 @@ class BlogHolder extends BlogTree implements PermissionProvider {
*/
function requireDefaultRecords() {
parent::requireDefaultRecords();
// Skip creation of default records
if(!self::config()->create_default_pages) return;
$blogHolder = DataObject::get_one('BlogHolder');
//TODO: This does not check for whether this blogholder is an orphan or not
if(!$blogHolder) {