X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelineretweetedtome.php;h=a3ffa7db3037a6262cb4678f067cdb146f72fad1;hb=f2bfcdc2c1d7bc4634bb06285380884a57075759;hp=b9f9be1dda0151a89b8190155064435a39db5d6d;hpb=59a413cf5e246c33c684b2338ab8443232776b3f;p=quix0rs-gnu-social.git diff --git a/actions/apitimelineretweetedtome.php b/actions/apitimelineretweetedtome.php index b9f9be1dda..a3ffa7db30 100644 --- a/actions/apitimelineretweetedtome.php +++ b/actions/apitimelineretweetedtome.php @@ -31,8 +31,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apiauth.php'; - /** * Show most recent notices that are repeats in user's inbox * @@ -61,7 +59,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction * * @return boolean success flag */ - function prepare($args) + function prepare(array $args=array()) { parent::prepare($args); @@ -85,7 +83,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction * * @return void */ - function handle($args) + function handle(array $args=array()) { parent::handle($args); @@ -95,6 +93,9 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction // TRANS: Title for Atom feed "repeated to me". %s is the user nickname. $title = sprintf(_("Repeated to %s"), $this->auth_user->nickname); $subtitle = sprintf( + // @todo FIXME: $profile is not defined. + // TRANS: Subtitle for API action that shows most recent notices that are repeats in user's inbox. + // TRANS: %1$s is the sitename, %2$s is a user nickname, %3$s is a user profile name. _('%1$s notices that were to repeated to %2$s / %3$s.'), $sitename, $this->user->nickname, $profile->getBestName() ); @@ -135,7 +136,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction break; case 'as': - header('Content-Type: application/json; charset=utf-8'); + header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE); $doc = new ActivityStreamJSONDocument($this->auth_user); $doc->setTitle($title); $doc->addLink($link, 'alternate', 'text/html'); @@ -143,7 +144,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction $this->raw($doc->asString()); break; default: - // TRANS: Client error displayed when trying to handle an unknown API method. + // TRANS: Client error displayed when coming across a non-supported API method. $this->clientError(_('API method not found.'), $code = 404); break; } @@ -158,7 +159,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction * * @return boolean is read only action? */ - function isReadOnly($args) + function isReadOnly(array $args=array()) { return true; }