BaseActivity Fix

This commit is contained in:
buddha87 2017-01-04 15:08:26 +01:00
parent b6efd6c2f8
commit 16e48e405c
2 changed files with 2748 additions and 5 deletions

View File

@ -139,18 +139,18 @@ abstract class BaseActivity extends \humhub\components\SocialActivity
$this->record->content->visibility = $this->getContentVisibility(); $this->record->content->visibility = $this->getContentVisibility();
if (!$this->content->container) { if (!$this->content->container) {
$model->content->container = $this->getContentContainer(); $this->record->content->container = $this->getContentContainer();
} }
$model->content->created_by = $this->getOriginatorId(); $this->record->content->created_by = $this->getOriginatorId();
if ($model->content->created_by == null) { if ($this->record->content->created_by == null) {
throw new \yii\base\InvalidConfigException("Could not determine originator for activity!"); throw new \yii\base\InvalidConfigException("Could not determine originator for activity!");
} }
if (!$model->validate() || !$model->save()) { if (!$this->record->validate() || !$this->record->save()) {
throw new \yii\base\Exception("Could not save activity!" . $model->getErrors()); throw new \yii\base\Exception("Could not save activity!" . $this->record->getErrors());
} }
} }

2743
themes/HumHub/css/theme.css Normal file

File diff suppressed because it is too large Load Diff