X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapiaccountratelimitstatus.php;h=592cf908fcf49d71dcfe896411361862b8180fe8;hb=1eff108561bf395010a05dd490c0f4070c192c16;hp=1a5afd552c90d8c1d43b6ecdb0cd257dfd40d356;hpb=935410e8dc4c2d4d286a942cc27bbf8bc452fbdd;p=quix0rs-gnu-social.git diff --git a/actions/apiaccountratelimitstatus.php b/actions/apiaccountratelimitstatus.php index 1a5afd552c..592cf908fc 100644 --- a/actions/apiaccountratelimitstatus.php +++ b/actions/apiaccountratelimitstatus.php @@ -21,19 +21,17 @@ * * @category API * @package StatusNet + * @author Brion Vibber * @author Evan Prodromou * @author Robin Millette + * @author Siebrand Mazeland * @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 * @link http://status.net/ */ -if (!defined('STATUSNET')) { - exit(1); -} - -require_once INSTALLDIR . '/lib/apibareauth.php'; +if (!defined('GNUSOCIAL')) { exit(1); } /** * We don't have a rate limit, but some clients check this method. @@ -47,10 +45,8 @@ require_once INSTALLDIR . '/lib/apibareauth.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class ApiAccountRateLimitStatusAction extends ApiBareAuthAction { - /** * Handle the request * @@ -60,18 +56,17 @@ class ApiAccountRateLimitStatusAction extends ApiBareAuthAction * * @return void */ - - function handle($args) + protected function handle() { - parent::handle($args); + parent::handle(); if (!in_array($this->format, array('xml', 'json'))) { $this->clientError( + // TRANS: Client error displayed when coming across a non-supported API method. _('API method not found.'), 404, $this->format ); - return; } $reset = new DateTime(); @@ -105,8 +100,20 @@ class ApiAccountRateLimitStatusAction extends ApiBareAuthAction print json_encode($out); } - $this->endDocument($this->format); + $this->endDocument($this->format); } + /** + * Return true if read only. + * + * MAY override + * + * @param array $args other arguments + * + * @return boolean is read only action? + */ + function isReadOnly($args) + { + return true; + } } -