X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fdisfavor.php;h=6269f1bd25aa56022bc5cc076b8dcd0899d00ae0;hb=4b80ce0be89fe50eabec1a19dbf4a0c26a413423;hp=90bab3ccae86325c5005dcea10f4a89318f7e297;hpb=3f0eb901283e266384f78e8cf1dbd7912bd2f254;p=quix0rs-gnu-social.git diff --git a/actions/disfavor.php b/actions/disfavor.php index 90bab3ccae..6269f1bd25 100644 --- a/actions/disfavor.php +++ b/actions/disfavor.php @@ -6,14 +6,14 @@ * PHP version 5 * * @category Action - * @package Laconica - * @author Evan Prodromou - * @author Robin Millette + * @package StatusNet + * @author Evan Prodromou + * @author Robin Millette * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 - * @link http://laconi.ca/ + * @link http://status.net/ * - * Laconica - a distributed open-source microblogging tool - * Copyright (C) 2008, Controlez-Vous, Inc. + * StatusNet - the distributed open-source microblogging tool + * Copyright (C) 2008, 2009, StatusNet, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -29,7 +29,7 @@ * along with this program. If not, see . */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -39,17 +39,17 @@ require_once INSTALLDIR.'/lib/favorform.php'; * Disfavor class. * * @category Action - * @package Laconica - * @author Evan Prodromou - * @author Robin Millette + * @package StatusNet + * @author Evan Prodromou + * @author Robin Millette * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 - * @link http://laconi.ca/ + * @link http://status.net/ */ class DisfavorAction extends Action { /** * Class handler. - * + * * @param array $args query arguments * * @return void @@ -75,7 +75,7 @@ class DisfavorAction extends Action return; } $fave = new Fave(); - $fave->user_id = $this->id; + $fave->user_id = $user->id; $fave->notice_id = $notice->id; if (!$fave->find(true)) { $this->clientError(_('This notice is not a favorite!')); @@ -100,7 +100,8 @@ class DisfavorAction extends Action $this->elementEnd('html'); } else { common_redirect(common_local_url('showfavorites', - array('nickname' => $user->nickname))); + array('nickname' => $user->nickname)), + 303); } } }