]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apistatusesshow.php
Fix for API group methods, caused failure or output corruption when pulling up local...
[quix0rs-gnu-social.git] / actions / apistatusesshow.php
index 9e28fe2ab683b6ca6ea03ae1da4a61730d854d2a..0315d2953eac7604acdd161c9533b22c2df4504b 100644 (file)
  *
  * @category  API
  * @package   StatusNet
+ * @author    Craig Andrews <candrews@integralblue.com>
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    Jeffery To <jeffery.to@gmail.com>
+ * @author    Tom Blankenship <mac65@mac65.com>
+ * @author    Mike Cochrane <mikec@mikenz.geek.nz>
+ * @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,24 +37,29 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/api.php';
+require_once INSTALLDIR . '/lib/apiprivateauth.php';
 
 /**
  * Returns the notice specified by id as a Twitter-style status and inline user
  *
  * @category API
  * @package  StatusNet
+ * @author   Craig Andrews <candrews@integralblue.com>
+ * @author   Evan Prodromou <evan@status.net>
+ * @author   Jeffery To <jeffery.to@gmail.com>
+ * @author   Tom Blankenship <mac65@mac65.com>
+ * @author   Mike Cochrane <mikec@mikenz.geek.nz>
+ * @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/
  */
 
-class ApiStatusesShowAction extends ApiAction
+class ApiStatusesShowAction extends ApiPrivateAuthAction
 {
 
     var $notice_id = null;
     var $notice    = null;
-    var $format    = null;
 
     /**
      * Take arguments for running
@@ -74,7 +85,6 @@ class ApiStatusesShowAction extends ApiAction
             $this->notice_id = (int)$this->arg('id');
         }
 
-        $this->format = $this->arg('format');
         $this->notice = Notice::staticGet((int)$this->notice_id);
 
         return true;
@@ -95,7 +105,7 @@ class ApiStatusesShowAction extends ApiAction
         parent::handle($args);
 
         if (!in_array($this->format, array('xml', 'json'))) {
-            $this->clientError(_('API method not found!'), $code = 404);
+            $this->clientError(_('API method not found.'), $code = 404);
             return;
         }
 
@@ -112,7 +122,7 @@ class ApiStatusesShowAction extends ApiAction
     {
         if (!empty($this->notice)) {
             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);
             }