From 4468404c71e65b439cc5f363bb57302fad3141dd Mon Sep 17 00:00:00 2001 From: yurabakhtin Date: Mon, 19 Oct 2020 13:45:49 +0300 Subject: [PATCH] Revert "Wall Stream Layout Migration" This reverts commit 885cf07c5cd5b6daf66e250f6fee10c56f437a03. --- docs/CHANGELOG.md | 4 ---- module.json | 4 ++-- widgets/WallEntry.php | 20 ++++++-------------- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 864fbfd..0a99e64 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,10 +1,6 @@ Changelog ========= -0.9.21 (Unreleased) ---------------------- -- Enh #71: Wall Stream Layout Migration - 0.9.20 - October 16, 2020 ------------------------- - Enh #15: Implement user profile polls diff --git a/module.json b/module.json index bf3c5ec..723ef78 100644 --- a/module.json +++ b/module.json @@ -3,9 +3,9 @@ "name": "Polls", "description": "Easy to use poll system", "keywords": ["poll", "voting", "decision making"], - "version": "0.9.21", + "version": "0.9.20", "humhub": { - "minVersion": "1.7" + "minVersion": "1.6" }, "homepage": "https://github.com/humhub/humhub-modules-polls", "authors": [ diff --git a/widgets/WallEntry.php b/widgets/WallEntry.php index f29f761..5d1960f 100644 --- a/widgets/WallEntry.php +++ b/widgets/WallEntry.php @@ -2,7 +2,6 @@ namespace humhub\modules\polls\widgets; -use humhub\modules\content\widgets\stream\WallStreamModuleEntryWidget; use Yii; /** @@ -14,28 +13,21 @@ * @since 0.5 * @author Luke */ -class WallEntry extends WallStreamModuleEntryWidget +class WallEntry extends \humhub\modules\content\widgets\WallEntry { public $editRoute = "/polls/poll/edit"; - public function renderContent() + public function run() { //We don't want an edit menu when the poll is closed - if(version_compare(Yii::$app->version, '1.0.0-beta.4', 'lt') || $this->model->closed) { + if(version_compare(Yii::$app->version, '1.0.0-beta.4', 'lt') || $this->contentObject->closed) { $this->editRoute = ''; } - return $this->render('entry', ['poll' => $this->model, - 'user' => $this->model->content->createdBy, - 'contentContainer' => $this->model->content->container]); + return $this->render('entry', ['poll' => $this->contentObject, + 'user' => $this->contentObject->content->createdBy, + 'contentContainer' => $this->contentObject->content->container]); } - /** - * @return string a non encoded plain text title (no html allowed) used in the header of the widget - */ - protected function getTitle() - { - return $this->model->question; - } } \ No newline at end of file