X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapistatusnetversion.php;h=d0948075978210c76a8816fa7b68af9b45090e1a;hb=72460091ddc6763cb8d62f9d865390ea4973dd44;hp=2cd99edb7a83b9cdb91db91eed780b36623bea19;hpb=f746993c2bfb674d397cf095a2ab2ff7e757818b;p=quix0rs-gnu-social.git diff --git a/actions/apistatusnetversion.php b/actions/apistatusnetversion.php index 2cd99edb7a..d094807597 100644 --- a/actions/apistatusnetversion.php +++ b/actions/apistatusnetversion.php @@ -21,6 +21,7 @@ * * @category API * @package StatusNet + * @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 +32,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/api.php'; +require_once INSTALLDIR . '/lib/apiprivateauth.php'; /** * Returns a version number for this version of StatusNet, which @@ -41,12 +42,13 @@ require_once INSTALLDIR . '/lib/api.php'; * * @category API * @package StatusNet + * @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/ */ -class ApiStatusnetVersionAction extends TwitterApiAction +class ApiStatusnetVersionAction extends ApiPrivateAuthAction { /** * Take arguments for running @@ -77,24 +79,39 @@ class ApiStatusnetVersionAction extends TwitterApiAction switch ($this->format) { case 'xml': - $this->init_document('xml'); + $this->initDocument('xml'); $this->element('version', null, STATUSNET_VERSION); - $this->end_document('xml'); + $this->endDocument('xml'); break; case 'json': - $this->init_document('json'); + $this->initDocument('json'); print '"'.STATUSNET_VERSION.'"'; - $this->end_document('json'); + $this->endDocument('json'); break; default: $this->clientError( - _('API method not found!'), - 404, + _('API method not found.'), + 404, $this->format ); break; } } + /** + * Return true if read only. + * + * MAY override + * + * @param array $args other arguments + * + * @return boolean is read only action? + */ + + function isReadOnly($args) + { + return true; + } + }