Skip to content

Commit

Permalink
Fix #2582 Userfollow activity click action not working
Browse files Browse the repository at this point in the history
Enh: Make space membership activities clickable
  • Loading branch information
buddh4 committed Jul 29, 2017
1 parent 71155de commit 0c4f031
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
3 changes: 3 additions & 0 deletions protected/humhub/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ HumHub Change Log
- Enh: Added `ContentTag` concept for creating content categories/filter on module level
- Fix: Mentioning keeps running even if previous input result was empty
- Enh: Darkened comment links for better readability
- Fix #2582 Userfollow activity click action not working
- Enh: Make space membership activities clickable


1.2.1 (June 17, 2017)
- Fix: Invite error in french language
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public function about($source)
public function container($container)
{
$this->record->content->container = $container;

return $this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
use Yii;
use humhub\components\Controller;
use humhub\modules\activity\models\Activity;
use humhub\modules\content\components\ContentActiveRecord;
use humhub\modules\content\components\ContentAddonActiveRecord;

/**
* LinkController provides link informations about an Activity via JSON.
Expand Down Expand Up @@ -43,9 +41,8 @@ public function actionIndex()
$activityId = Yii::$app->request->get('id');
$activity = Activity::findOne(['id' => $activityId]);

if ($activity !== null && $activity->content->canRead()) {
$source = $activity->getSource();
$this->redirect($source->content->getUrl());
if ($activity !== null && $activity->content->canView()) {
$this->redirect($activity->getActivityBaseClass()->getUrl());
}
}

Expand Down
6 changes: 0 additions & 6 deletions protected/humhub/modules/space/activities/MemberAdded.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
*/
class MemberAdded extends BaseActivity implements ConfigurableActivityInterface
{

/**
* @inheritdoc
*/
public $clickable = false;

/**
* @inheritdoc
*/
Expand Down
5 changes: 0 additions & 5 deletions protected/humhub/modules/space/activities/MemberRemoved.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
class MemberRemoved extends BaseActivity implements ConfigurableActivityInterface
{

/**
* @inheritdoc
*/
public $clickable = false;

/**
* @inheritdoc
*/
Expand Down
8 changes: 8 additions & 0 deletions protected/humhub/modules/user/activities/UserFollow.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,12 @@ class UserFollow extends BaseActivity
*/
public $viewName = "userFollow";

/**
* @inheritdoc
*/
public function getUrl()
{
return $this->source->target->getUrl();
}

}

0 comments on commit 0c4f031

Please sign in to comment.