X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fleavegroup.php;h=08fce150980eb406fce36bf46ceff307bf66ba32;hb=0bb65f8739371bdb0b49f41f14fb284c239dda53;hp=1d85aa3d521f2e68a1e84760e017a25693e8f017;hpb=f8d13817174a63dc8452ed60a00b7d336633fa88;p=quix0rs-gnu-social.git diff --git a/actions/leavegroup.php b/actions/leavegroup.php index 1d85aa3d52..08fce15098 100644 --- a/actions/leavegroup.php +++ b/actions/leavegroup.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); } @@ -38,10 +38,10 @@ if (!defined('LACONICA')) { * for users. * * @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 LeavegroupAction extends Action @@ -56,11 +56,6 @@ class LeavegroupAction extends Action { parent::prepare($args); - if (!common_config('inboxes','enabled')) { - $this->serverError(_('Inboxes must be enabled for groups to work.')); - return false; - } - if (!common_logged_in()) { $this->clientError(_('You must be logged in to leave a group.')); return false; @@ -96,12 +91,6 @@ class LeavegroupAction extends Action return false; } - if ($cur->isAdmin($this->group)) { - $this->clientError(_('You may not leave a group while you are its administrator.'), 403); - return false; - - } - return true; } @@ -153,7 +142,8 @@ class LeavegroupAction extends Action $this->elementEnd('html'); } else { common_redirect(common_local_url('groupmembers', array('nickname' => - $this->group->nickname))); + $this->group->nickname)), + 303); } } }