summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/groupmembers.php2
-rw-r--r--actions/joingroup.php5
-rw-r--r--actions/showgroup.php2
3 files changed, 7 insertions, 2 deletions
diff --git a/actions/groupmembers.php b/actions/groupmembers.php
index 079dad9e9..150b60a54 100644
--- a/actions/groupmembers.php
+++ b/actions/groupmembers.php
@@ -180,7 +180,7 @@ class GroupMemberListItem extends ProfileListItem
$user = common_current_user();
if (!empty($user) && $user->id != $this->profile->id && $user->isAdmin($this->group)) {
- $bf = new GroupBlockForm($this->out, $this->profile,
+ $bf = new GroupBlockForm($this->out, $this->profile, $this->group,
array('action' => 'groupmembers',
'nickname' => $this->group->nickname));
$bf->show();
diff --git a/actions/joingroup.php b/actions/joingroup.php
index a5d82ddc7..0e4f96eaf 100644
--- a/actions/joingroup.php
+++ b/actions/joingroup.php
@@ -96,6 +96,11 @@ class JoingroupAction extends Action
return false;
}
+ if (Group_block::isBlocked($this->group, $cur->getProfile())) {
+ $this->clientError(_('You have been blocked from that group by the admin.'), 403);
+ return false;
+ }
+
return true;
}
diff --git a/actions/showgroup.php b/actions/showgroup.php
index 3ce45adc6..537f09278 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -283,7 +283,7 @@ class ShowgroupAction extends Action
if ($cur->isMember($this->group)) {
$lf = new LeaveForm($this, $this->group);
$lf->show();
- } else {
+ } else if (!Group_block::isBlocked($this->group, $cur->getProfile())) {
$jf = new JoinForm($this, $this->group);
$jf->show();
}