mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #113 from tractorcow/pulls/fix-default-creation
BUG Fix BlogHolder::requireDefaultRecords not respecting SiteTree.create_default_pages config
This commit is contained in:
commit
9a6152b8e4
@ -121,6 +121,9 @@ class BlogHolder extends BlogTree implements PermissionProvider {
|
|||||||
function requireDefaultRecords() {
|
function requireDefaultRecords() {
|
||||||
parent::requireDefaultRecords();
|
parent::requireDefaultRecords();
|
||||||
|
|
||||||
|
// Skip creation of default records
|
||||||
|
if(!self::config()->create_default_pages) return;
|
||||||
|
|
||||||
$blogHolder = DataObject::get_one('BlogHolder');
|
$blogHolder = DataObject::get_one('BlogHolder');
|
||||||
//TODO: This does not check for whether this blogholder is an orphan or not
|
//TODO: This does not check for whether this blogholder is an orphan or not
|
||||||
if(!$blogHolder) {
|
if(!$blogHolder) {
|
||||||
|
Loading…
Reference in New Issue
Block a user