X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fblockedfromgroup.php;h=a0598db270e64767f3432fd3ff5e18cf1d4601fe;hb=7e55fc00447923b40b2ffc87329fd95347d776f5;hp=5c1eab35425775693a8b067741352ac297c8e68b;hpb=65f784120b45dc187e28313fa2c2dca2c976c150;p=quix0rs-gnu-social.git diff --git a/actions/blockedfromgroup.php b/actions/blockedfromgroup.php index 5c1eab3542..a0598db270 100644 --- a/actions/blockedfromgroup.php +++ b/actions/blockedfromgroup.php @@ -1,6 +1,6 @@ . * * @category Group - * @package Laconica - * @author Evan Prodromou - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -35,10 +35,10 @@ if (!defined('LACONICA')) { * List of profiles blocked from this group * * @category Group - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ class BlockedfromgroupAction extends GroupDesignAction @@ -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); } @@ -190,11 +197,11 @@ class GroupBlockListItem extends ProfileListItem * Form for unblocking a user from a group * * @category Form - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * * @see UnblockForm */