Skip to content

Commit

Permalink
Revert "Wall Stream Layout Migration"
Browse files Browse the repository at this point in the history
This reverts commit 885cf07.
  • Loading branch information
yurabakhtin committed Oct 19, 2020
1 parent 885cf07 commit 4468404
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
4 changes: 0 additions & 4 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
20 changes: 6 additions & 14 deletions widgets/WallEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace humhub\modules\polls\widgets;

use humhub\modules\content\widgets\stream\WallStreamModuleEntryWidget;
use Yii;

/**
Expand All @@ -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;
}
}

0 comments on commit 4468404

Please sign in to comment.