X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapistatusesretweets.php;h=722019683630d7b152074f50b06a14bf46003d82;hb=7d64d8c78cfa102b91975598ef9e574d2ef14b8c;hp=c54a374e28838427138ea079badf91fbee6e5655;hpb=a3660fbea46be4d9408cd0f824166a75b8c865ab;p=quix0rs-gnu-social.git diff --git a/actions/apistatusesretweets.php b/actions/apistatusesretweets.php index c54a374e28..7220196836 100644 --- a/actions/apistatusesretweets.php +++ b/actions/apistatusesretweets.php @@ -43,7 +43,6 @@ require_once INSTALLDIR . '/lib/mediafile.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 ApiStatusesRetweetsAction extends ApiAuthAction { const MAXCOUNT = 100; @@ -57,9 +56,7 @@ class ApiStatusesRetweetsAction extends ApiAuthAction * @param array $args $_REQUEST args * * @return boolean success flag - * */ - function prepare($args) { parent::prepare($args); @@ -69,7 +66,8 @@ class ApiStatusesRetweetsAction extends ApiAuthAction $this->original = Notice::staticGet('id', $id); if (empty($this->original)) { - $this->clientError(_('No such notice'), + // TRANS: Client error displayed trying to display redents of a non-exiting notice. + $this->clientError(_('No such notice.'), 400, $this->format); return false; } @@ -94,7 +92,6 @@ class ApiStatusesRetweetsAction extends ApiAuthAction * * @return void */ - function handle($args) { parent::handle($args); @@ -109,8 +106,24 @@ class ApiStatusesRetweetsAction extends ApiAuthAction $this->showJsonTimeline($strm); break; default: - $this->clientError(_('API method not found!'), $code = 404); + // TRANS: Client error displayed when coming across a non-supported API method. + $this->clientError(_('API method not found.'), $code = 404); break; } } + + /** + * Return true if read only. + * + * MAY override + * + * @param array $args other arguments + * + * @return boolean is read only action? + */ + + function isReadOnly($args) + { + return true; + } }