mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 06:08:21 +01:00
Fix pin and archive global content without container (#5066)
This commit is contained in:
parent
0112192149
commit
e388db32b2
@ -4,6 +4,7 @@ HumHub Changelog
|
|||||||
1.8.3 (Unreleased)
|
1.8.3 (Unreleased)
|
||||||
----------------------
|
----------------------
|
||||||
- Fix #29: Fix login form view on browser back button after footer link
|
- Fix #29: Fix login form view on browser back button after footer link
|
||||||
|
- Fix #5066: Fix pin and archive global content without container
|
||||||
|
|
||||||
|
|
||||||
1.8.2 (April 26, 2021)
|
1.8.2 (April 26, 2021)
|
||||||
|
@ -371,6 +371,11 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
*/
|
*/
|
||||||
public function canPin()
|
public function canPin()
|
||||||
{
|
{
|
||||||
|
// Currently global content can not be pinned
|
||||||
|
if (!$this->getContainer()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->isArchived()) {
|
if ($this->isArchived()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -410,12 +415,12 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
public function canArchive()
|
public function canArchive()
|
||||||
{
|
{
|
||||||
// Currently global content can not be archived
|
// Currently global content can not be archived
|
||||||
if (!$this->contentcontainer_id) {
|
if (!$this->getContainer()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No need to archive content on an archived container, content is marked as archived already
|
// No need to archive content on an archived container, content is marked as archived already
|
||||||
if ($this->content->content->getContainer()->isArchived()) {
|
if ($this->getContainer()->isArchived()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user