X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapistatusesretweets.php;h=82e86b9264689c453f6ddd56c8f3c050de8feaa3;hb=fb70dc02362155c8951a1a0ad66a668f1f857ca5;hp=a79d43168ed49829c1647feceeafa6426049d7e5;hpb=611924e814320c768771af21a923e615118c1feb;p=quix0rs-gnu-social.git diff --git a/actions/apistatusesretweets.php b/actions/apistatusesretweets.php index a79d43168e..82e86b9264 100644 --- a/actions/apistatusesretweets.php +++ b/actions/apistatusesretweets.php @@ -31,9 +31,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apiauth.php'; -require_once INSTALLDIR . '/lib/mediafile.php'; - /** * Show up to 100 repeats of a notice * @@ -43,7 +40,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,18 +53,17 @@ class ApiStatusesRetweetsAction extends ApiAuthAction * @param array $args $_REQUEST args * * @return boolean success flag - * */ - - function prepare($args) + function prepare(array $args=array()) { parent::prepare($args); $id = $this->trimmed('id'); - $this->original = Notice::staticGet('id', $id); + $this->original = Notice::getKV('id', $id); if (empty($this->original)) { + // TRANS: Client error displayed trying to display redents of a non-exiting notice. $this->clientError(_('No such notice.'), 400, $this->format); return false; @@ -94,8 +89,7 @@ class ApiStatusesRetweetsAction extends ApiAuthAction * * @return void */ - - function handle($args) + function handle(array $args=array()) { parent::handle($args); @@ -109,6 +103,7 @@ class ApiStatusesRetweetsAction extends ApiAuthAction $this->showJsonTimeline($strm); break; default: + // TRANS: Client error displayed when coming across a non-supported API method. $this->clientError(_('API method not found.'), $code = 404); break; } @@ -124,7 +119,7 @@ class ApiStatusesRetweetsAction extends ApiAuthAction * @return boolean is read only action? */ - function isReadOnly($args) + function isReadOnly(array $args=array()) { return true; }