code/extensions/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 |
|
/** |
code/extensions/SiteTreeSubsites.php 1 location
|
@@ 94-96 (lines=3) @@
|
91 |
|
|
92 |
|
public function onBeforeWrite() |
93 |
|
{ |
94 |
|
if (!$this->owner->ID && !$this->owner->SubsiteID) { |
95 |
|
$this->owner->SubsiteID = SubsiteState::singleton()->getSubsiteId(); |
96 |
|
} |
97 |
|
|
98 |
|
parent::onBeforeWrite(); |
99 |
|
} |