Skip to content

Commit

Permalink
fix(archived): Fix for archived PageSections
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco (Valandur) committed Oct 24, 2018
1 parent 0f42fd9 commit 1c82636
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PageSectionsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function onAfterWrite()
{
parent::onAfterWrite();

if ($this->owner->ID && !$this->owner->__rewrite) {
if ($this->owner->ID && !$this->owner->__archived) {
$sections = $this->getPageSectionNames();

foreach ($sections as $sectionName) {
Expand All @@ -109,6 +109,7 @@ public function onBeforeArchive()
{
$sections = $this->getPageSectionNames();

$this->owner->__archived = true;
foreach ($sections as $sectionName) {
$name = "PageSection".$sectionName;
$this->owner->{$name . "ID"} = 0;
Expand Down

0 comments on commit 1c82636

Please sign in to comment.