X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fleavegroup.php;h=90c85e1a4e6e602eed57d7b552745564f8c41ae2;hb=a1c3a2d3a12c1667492e4107007b31ec3a1f9c7b;hp=215ccd9017516f90a421dd6fe623a414709cf00b;hpb=6be15dfcacfa821566c16e71cc7bc478b2ff9433;p=quix0rs-gnu-social.git diff --git a/actions/leavegroup.php b/actions/leavegroup.php index 215ccd9017..90c85e1a4e 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; @@ -128,8 +123,8 @@ class LeavegroupAction extends Action $result = $member->delete(); if (!$result) { - common_log_db_error($member, 'INSERT', __FILE__); - $this->serverError(sprintf(_('Could not remove user %s to group %s'), + common_log_db_error($member, 'DELETE', __FILE__); + $this->serverError(sprintf(_('Could not remove user %s from group %s'), $cur->nickname, $this->group->nickname)); }