X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fblockedfromgroup.php;h=a0598db270e64767f3432fd3ff5e18cf1d4601fe;hb=21f253c5845eb17b7aa599b030855324caf9f312;hp=dea868fc636ec1ac8164e8831d0e34752b2a8a92;hpb=ae883ceb9b4689f6c1dd3aecdc4a844eda7d179a;p=quix0rs-gnu-social.git diff --git a/actions/blockedfromgroup.php b/actions/blockedfromgroup.php index dea868fc63..a0598db270 100644 --- a/actions/blockedfromgroup.php +++ b/actions/blockedfromgroup.php @@ -27,7 +27,7 @@ * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -70,14 +70,21 @@ class BlockedfromgroupAction extends GroupDesignAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } - $this->group = User_group::staticGet('nickname', $nickname); + $local = Local_group::staticGet('nickname', $nickname); + + if (!$local) { + $this->clientError(_('No such group.'), 404); + return false; + } + + $this->group = User_group::staticGet('id', $local->group_id); if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } @@ -90,7 +97,7 @@ class BlockedfromgroupAction extends GroupDesignAction return sprintf(_('%s blocked profiles'), $this->group->nickname); } else { - return sprintf(_('%s blocked profiles, page %d'), + return sprintf(_('%1$s blocked profiles, page %2$d'), $this->group->nickname, $this->page); }