mirror of
https://github.com/humhub/humhub.git
synced 2025-03-04 07:08:58 +01:00
Fixed: Fixed comments show files option
This commit is contained in:
parent
25c521e3b9
commit
953a725a81
@ -137,7 +137,7 @@ class ContentActiveRecord extends ActiveRecord implements \humhub\modules\conten
|
||||
$class = $this->wallEntryClass;
|
||||
$widget = new $class;
|
||||
$widget->contentObject = $this;
|
||||
return §widget;
|
||||
return $widget;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace humhub\modules\file\widgets;
|
||||
|
||||
use humhub\modules\content\components\ContentActiveRecord;
|
||||
use humhub\models\Setting;
|
||||
|
||||
/**
|
||||
@ -23,11 +24,13 @@ class ShowFiles extends \yii\base\Widget
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$widget = $this->object->getWallEntryWidget();
|
||||
if ($this->object instanceof ContentActiveRecord) {
|
||||
$widget = $this->object->getWallEntryWidget();
|
||||
|
||||
// File widget disabled in this wall entry
|
||||
if ($widget->showFiles === false) {
|
||||
return;
|
||||
// File widget disabled in this wall entry
|
||||
if ($widget->showFiles === false) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$blacklisted_objects = explode(',', Setting::GetText('showFilesWidgetBlacklist', 'file'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user