Skip to content

Commit

Permalink
Fix replaced method friendship\Module::isEnabled()
Browse files Browse the repository at this point in the history
  • Loading branch information
yurabakhtin committed Jan 19, 2024
1 parent 3290dca commit 9538efb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

0.16.4 - Unreleased
---------------------------
- Fix #201: Fix replaced method `friendship\Module::isEnabled()`

0.16.3 - November 16, 2023
---------------------------
- Enh #194: Tests for `next` version
Expand Down
2 changes: 1 addition & 1 deletion models/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public function updateVisibility($visibility)

public function getVisibilityTitle()
{
if(Yii::$app->getModule('friendship')->getIsEnabled() && $this->content->container instanceof User) {
if(Yii::$app->getModule('friendship')->settings->get('enable') && $this->content->container instanceof User) {
if($this->content->container->isCurrentuser()) {
$privateText = Yii::t('CfilesModule.base', 'This file is only visible for you and your friends.');
} else {
Expand Down
2 changes: 1 addition & 1 deletion models/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public function beforeDelete()

public function getVisibilityTitle()
{
if (Yii::$app->getModule('friendship')->getIsEnabled() && $this->content->container instanceof User) {
if (Yii::$app->getModule('friendship')->settings->get('enable') && $this->content->container instanceof User) {
if ($this->content->container->isCurrentuser()) {
$privateText = Yii::t('CfilesModule.base', 'This folder is only visible for you and your friends.');
} else {
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"organisation",
"sharing"
],
"version": "0.16.3",
"version": "0.16.4",
"humhub": {
"minVersion": "1.14"
},
Expand Down

0 comments on commit 9538efb

Please sign in to comment.