Skip to content

Commit

Permalink
Fix: Stream Channel was set for AdminOnly pages
Browse files Browse the repository at this point in the history
  • Loading branch information
luke- committed Feb 23, 2021
1 parent 31768b8 commit 6a2398a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 6 additions & 6 deletions models/CustomContentContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down

0 comments on commit 6a2398a

Please sign in to comment.