X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fblockedfromgroup.php;h=a0598db270e64767f3432fd3ff5e18cf1d4601fe;hb=61ca2cb6b5f474c3fb7f2b59bbb26b2ba25aa46e;hp=541ebcfd90701d1074f038a97d46b08300b1d002;hpb=4dad3191f65512b04894377541c4a041221ed9a2;p=quix0rs-gnu-social.git diff --git a/actions/blockedfromgroup.php b/actions/blockedfromgroup.php index 541ebcfd90..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,13 +35,13 @@ 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 Action +class BlockedfromgroupAction extends GroupDesignAction { var $page = null; @@ -70,14 +70,21 @@ class BlockedfromgroupAction extends Action } 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 Action 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 */