Skip to content

Commit

Permalink
Fix space name in membership confirmation (#5790)
Browse files Browse the repository at this point in the history
* Fix space name in membership confirmation

* Fix space name in membership confirmation

* Fix user name in unfollow confirmation
  • Loading branch information
yurabakhtin committed Jul 5, 2022
1 parent fe5c3b5 commit f88991d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion protected/humhub/modules/space/widgets/FollowButton.php
Expand Up @@ -118,7 +118,7 @@ public function run()

// Confirm action "Unfollow"
$this->unfollowOptions['data-action-confirm'] = Yii::t('SpaceModule.base', 'Would you like to unfollow Space {spaceName}?', [
'{spaceName}' => '<strong>' . $this->space->getDisplayName() . '</strong>'
'{spaceName}' => '<strong>' . Html::encode($this->space->getDisplayName()) . '</strong>'
]);

$module = Yii::$app->getModule('space');
Expand Down
5 changes: 3 additions & 2 deletions protected/humhub/modules/space/widgets/MembershipButton.php
Expand Up @@ -12,6 +12,7 @@
use humhub\modules\space\models\Space;
use Yii;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\helpers\Json;

/**
Expand Down Expand Up @@ -84,7 +85,7 @@ private function getDefaultOptions()
'attrs' => [
'data-action-click' => 'content.container.relationship',
'data-action-url' => $this->space->createUrl('/space/membership/revoke-membership'),
'data-action-confirm' => Yii::t('SpaceModule.base', 'Would you like to withdraw your request to join Space {spaceName}?', ['{spaceName}' => '<strong>' . $this->space->getDisplayName() . '</strong>']),
'data-action-confirm' => Yii::t('SpaceModule.base', 'Would you like to withdraw your request to join Space {spaceName}?', ['{spaceName}' => '<strong>' . Html::encode($this->space->getDisplayName()) . '</strong>']),
'data-button-options' => Json::encode($this->options),
'data-ui-loader' => '',
'class' => 'btn btn-info active',
Expand All @@ -96,7 +97,7 @@ private function getDefaultOptions()
'attrs' => [
'data-action-click' => 'content.container.relationship',
'data-action-url' => $this->space->createUrl('/space/membership/revoke-membership'),
'data-action-confirm' => Yii::t('SpaceModule.base', 'Would you like to end your membership in Space {spaceName}?', ['{spaceName}' => '<strong>' . $this->space->getDisplayName() . '</strong>']),
'data-action-confirm' => Yii::t('SpaceModule.base', 'Would you like to end your membership in Space {spaceName}?', ['{spaceName}' => '<strong>' . Html::encode($this->space->getDisplayName()) . '</strong>']),
'data-button-options' => Json::encode($this->options),
'data-ui-loader' => '',
'class' => 'btn btn-info active',
Expand Down
3 changes: 1 addition & 2 deletions protected/humhub/modules/user/widgets/UserFollowButton.php
Expand Up @@ -10,7 +10,6 @@

use Yii;
use yii\bootstrap\Html;
use humhub\modules\friendship\models\Friendship;

/**
* UserFollowButton
Expand Down Expand Up @@ -113,7 +112,7 @@ public function run()

// Confirm action "Unfollow"
$this->unfollowOptions['data-action-confirm'] = Yii::t('SpaceModule.base', 'Would you like to unfollow {userName}?', [
'{userName}' => '<strong>' . $this->user->getDisplayName() . '</strong>'
'{userName}' => '<strong>' . Html::encode($this->user->getDisplayName()) . '</strong>'
]);

$module = Yii::$app->getModule('user');
Expand Down

0 comments on commit f88991d

Please sign in to comment.