]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apiaccountratelimitstatus.php
Fix reference to sources class variable
[quix0rs-gnu-social.git] / actions / apiaccountratelimitstatus.php
index 3c6c3e714dcf55a943877c2abab970a021a26360..96179f175b87a582ef60054c83156395461bc7e7 100644 (file)
@@ -21,6 +21,8 @@
  *
  * @category  API
  * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    Robin Millette <robin@millette.info>
  * @author    Zach Copley <zach@status.net>
  * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
@@ -31,14 +33,16 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/apibareauth.php';
+require_once INSTALLDIR . '/lib/apibareauth.php';
 
 /**
  * We don't have a rate limit, but some clients check this method.
- * It always returns the same thing: 100 hits left.
+ * It always returns the same thing: 150 hits left.
  *
  * @category API
  * @package  StatusNet
+ * @author   Evan Prodromou <evan@status.net>
+ * @author   Robin Millette <robin@millette.info>
  * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
@@ -46,30 +50,6 @@ require_once INSTALLDIR.'/lib/apibareauth.php';
 
 class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
 {
-    var $format = null;
-
-    /**
-     * Take arguments for running
-     *
-     * @param array $args $_REQUEST args
-     *
-     * @return boolean success flag
-     *
-     */
-
-    function prepare($args)
-    {
-        parent::prepare($args);
-
-        if ($this->requiresAuth()) {
-            if ($this->checkBasicAuthUser() == false) {
-                return false;
-            }
-        }
-
-        $this->format = $this->arg('format');
-        return true;
-    }
 
     /**
      * Handle the request
@@ -97,7 +77,7 @@ class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
         $reset   = new DateTime();
         $reset->modify('+1 hour');
 
-        $this->init_document($this->format);
+        $this->initDocument($this->format);
 
          if ($this->format == 'xml') {
              $this->elementStart('hash');
@@ -125,7 +105,7 @@ class ApiAccountRateLimitStatusAction extends ApiBareAuthAction
              print json_encode($out);
          }
 
-         $this->end_document($this->format);
+         $this->endDocument($this->format);
     }
 
 }