X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapistatusesshow.php;h=0315d2953eac7604acdd161c9533b22c2df4504b;hb=ad651c35353021d05ef4a013e57c17d0b885c5dc;hp=55eea2356d143541f9b7cfc968e618adc92c0a6a;hpb=2b7d8d0c29a9b28700828db5184ed6d1dc7b1922;p=quix0rs-gnu-social.git diff --git a/actions/apistatusesshow.php b/actions/apistatusesshow.php index 55eea2356d..0315d2953e 100644 --- a/actions/apistatusesshow.php +++ b/actions/apistatusesshow.php @@ -21,6 +21,12 @@ * * @category API * @package StatusNet + * @author Craig Andrews + * @author Evan Prodromou + * @author Jeffery To + * @author Tom Blankenship + * @author Mike Cochrane + * @author Robin Millette * @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,24 +37,29 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR.'/lib/twitterapi.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 + * @author Evan Prodromou + * @author Jeffery To + * @author Tom Blankenship + * @author Mike Cochrane + * @author Robin Millette * @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/ */ -class ApiStatusesShowAction extends TwitterapiAction +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 TwitterapiAction $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 TwitterapiAction 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 TwitterapiAction { 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); }