X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Funsubscribe.php;h=6bb10d448b3e663ceb85b214f8a0db774e39b421;hb=869a6be0f5779aff69018d02f9ac0273946040d9;hp=3ce96aefbe27cff46923bac588072d2b28f493e4;hpb=d35b2d3f3c2128b147a6fa897032262c1f632262;p=quix0rs-gnu-social.git diff --git a/actions/unsubscribe.php b/actions/unsubscribe.php index 3ce96aefbe..6bb10d448b 100644 --- a/actions/unsubscribe.php +++ b/actions/unsubscribe.php @@ -6,8 +6,8 @@ * * @category Action * @package StatusNet - * @author Evan Prodromou - * @author Robin Millette + * @author Evan Prodromou + * @author Robin Millette * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ * @@ -28,7 +28,7 @@ * along with this program. If not, see . */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -37,8 +37,8 @@ if (!defined('LACONICA')) { * * @category Action * @package StatusNet - * @author Evan Prodromou - * @author Robin Millette + * @author Evan Prodromou + * @author Robin Millette * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ @@ -81,13 +81,13 @@ class UnsubscribeAction extends Action $other = Profile::staticGet('id', $other_id); if (!$other) { - $this->clientError(_('No profile with that id.')); + $this->clientError(_('No profile with that ID.')); return; } $result = subs_unsubscribe_to($user, $other); - if ($result != true) { + if (is_string($result)) { $this->clientError($result); return; }