src/Extension/SiteConfigSubsites.php 1 location
|
@@ 61-63 (lines=3) @@
|
58 |
|
|
59 |
|
public function onBeforeWrite() |
60 |
|
{ |
61 |
|
if ((!is_numeric($this->owner->ID) || !$this->owner->ID) && !$this->owner->SubsiteID) { |
62 |
|
$this->owner->SubsiteID = SubsiteState::singleton()->getSubsiteId(); |
63 |
|
} |
64 |
|
} |
65 |
|
|
66 |
|
/** |
src/Extension/SiteTreeSubsites.php 1 location
|
@@ 95-97 (lines=3) @@
|
92 |
|
|
93 |
|
public function onBeforeWrite() |
94 |
|
{ |
95 |
|
if (!$this->owner->ID && !$this->owner->SubsiteID) { |
96 |
|
$this->owner->SubsiteID = SubsiteState::singleton()->getSubsiteId(); |
97 |
|
} |
98 |
|
|
99 |
|
parent::onBeforeWrite(); |
100 |
|
} |