From 6a2398a3e8673488f423b9b1e98fe3fbcc31bfab Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Tue, 23 Feb 2021 19:18:42 +0100 Subject: [PATCH] Fix: Stream Channel was set for AdminOnly pages --- docs/CHANGELOG.md | 5 +++++ models/CustomContentContainer.php | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 1a6292e9..610f56de 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========= +1.3.1 (February 23, 2021) +------------------------- +- Fix: Stream Channel was set for AdminOnly pages + + 1.3.0 (February 22, 2021) ------------------------- - Fix #88: Text alignment resets when reloading ckeditor input diff --git a/models/CustomContentContainer.php b/models/CustomContentContainer.php index 22202d4a..954d0bbd 100644 --- a/models/CustomContentContainer.php +++ b/models/CustomContentContainer.php @@ -445,12 +445,6 @@ public function getIcon() { */ public function beforeSave($insert) { - if($this->checkAbstract() && !$this->admin_only) { - $this->streamChannel = 'default'; - } else { - $this->streamChannel = null; - } - switch($this->visibility) { case static::VISIBILITY_ADMIN_ONLY: $this->admin_only = 1; @@ -466,6 +460,12 @@ public function beforeSave($insert) break; } + if($this->checkAbstract() && !$this->admin_only) { + $this->streamChannel = 'default'; + } else { + $this->streamChannel = null; + } + return parent::beforeSave($insert); }