Merge branch 'master' into v0.21-dev

This commit is contained in:
Lucas Bartholemy 2015-11-12 11:19:05 +01:00
commit 23530b9369
2 changed files with 8 additions and 5 deletions

View File

@ -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;

View File

@ -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'));