X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapifavoritecreate.php;h=3618f940183d08f3303fe519d95d86ca312674b4;hb=72460091ddc6763cb8d62f9d865390ea4973dd44;hp=1b05eb95c9b768e2ad7eb63cad6c720957c4899c;hpb=e071a8cbffd8eaf63f2d92e15edc2f6f25d9c984;p=quix0rs-gnu-social.git diff --git a/actions/apifavoritecreate.php b/actions/apifavoritecreate.php index 1b05eb95c9..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 ); @@ -141,7 +144,6 @@ class ApiFavoriteCreateAction extends ApiAuthAction } } - /** * Notify the author of the favorite that the user likes their notice *