X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapifavoritecreate.php;h=3618f940183d08f3303fe519d95d86ca312674b4;hb=7ef6c9da437b504f949dc3d7d8c05f8abe36baae;hp=db001561ec62556cf179ba37d2ed91534e8ac7ee;hpb=743c844084bae75db02570d76694f4e9b79a9aa9;p=quix0rs-gnu-social.git diff --git a/actions/apifavoritecreate.php b/actions/apifavoritecreate.php index db001561ec..3618f94018 100644 --- a/actions/apifavoritecreate.php +++ b/actions/apifavoritecreate.php @@ -21,6 +21,8 @@ * * @category API * @package StatusNet + * @author Craig Andrews + * @author Evan Prodromou * @author Zach Copley * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 @@ -31,7 +33,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR.'/lib/apiauth.php'; +require_once INSTALLDIR . '/lib/apiauth.php'; /** * Favorites the status specified in the ID parameter as the authenticating user. @@ -39,6 +41,8 @@ require_once INSTALLDIR.'/lib/apiauth.php'; * * @category API * @package StatusNet + * @author Craig Andrews + * @author Evan Prodromou * @author Zach Copley * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ @@ -46,7 +50,6 @@ require_once INSTALLDIR.'/lib/apiauth.php'; class ApiFavoriteCreateAction extends ApiAuthAction { - var $user = null; var $notice = null; /** @@ -93,7 +96,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction if (!in_array($this->format, array('xml', 'json'))) { $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); @@ -113,7 +116,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction if ($this->user->hasFave($this->notice)) { $this->clientError( - _('This status is already a favorite!'), + _('This status is already a favorite.'), 403, $this->format ); @@ -124,7 +127,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction if (empty($fave)) { $this->clientError( - _('Could not create favorite.') + _('Could not create favorite.'), 403, $this->format ); @@ -135,13 +138,12 @@ class ApiFavoriteCreateAction extends ApiAuthAction $this->user->blowFavesCache(); if ($this->format == 'xml') { - $this->show_single_xml_status($this->notice); + $this->showSingleXmlStatus($this->notice); } elseif ($this->format == 'json') { $this->show_single_json_status($this->notice); } } - /** * Notify the author of the favorite that the user likes their notice *