X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fdisfavor.php;h=6269f1bd25aa56022bc5cc076b8dcd0899d00ae0;hb=c622d144400026dac65c39303994d11f114c0f5b;hp=09b3bf18d3d03ad8348afe465511d125f2962293;hpb=a2a2dd88b5a580715a1b8256a5d8b7743675711c;p=quix0rs-gnu-social.git diff --git a/actions/disfavor.php b/actions/disfavor.php index 09b3bf18d3..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!')); @@ -89,7 +89,7 @@ class DisfavorAction extends Action } $user->blowFavesCache(); if ($this->boolean('ajax')) { - $this->startHTML('text/xml;charset=utf-8', true); + $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); $this->element('title', null, _('Add to favorites')); $this->elementEnd('head'); @@ -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); } } }