X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinelist.php;h=91b26bf6c7714dc3465e963d7c961a88a9a39504;hb=a254f38a238179a88b08149e5dc44052cf4dd399;hp=c2339f9c357cdc0d104f1c244c5908b7dc3a2523;hpb=31b29fde50e9664e1b70064c043879ce87553883;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinelist.php b/actions/apitimelinelist.php index c2339f9c35..91b26bf6c7 100644 --- a/actions/apitimelinelist.php +++ b/actions/apitimelinelist.php @@ -35,7 +35,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apiprivateauth.php'; require_once INSTALLDIR . '/lib/atomlistnoticefeed.php'; /** @@ -67,7 +66,7 @@ class ApiTimelineListAction extends ApiPrivateAuthAction * @return boolean success flag * */ - function prepare($args) + protected function prepare(array $args=array()) { parent::prepare($args); @@ -82,18 +81,15 @@ class ApiTimelineListAction extends ApiPrivateAuthAction * * Just show the notices * - * @param array $args $_REQUEST data (unused) - * * @return void */ - function handle($args) + protected function handle() { - parent::handle($args); + parent::handle(); if (empty($this->list)) { // TRANS: Client error displayed trying to perform an action related to a non-existing list. - $this->clientError(_('List not found.'), 404, $this->format); - return false; + $this->clientError(_('List not found.'), 404); } $this->getNotices(); @@ -152,8 +148,7 @@ class ApiTimelineListAction extends ApiPrivateAuthAction } catch (Atom10FeedException $e) { // TRANS: Server error displayed whe trying to get a timeline fails. // TRANS: %s is the error message. - $this->serverError( sprintf(_('Could not generate feed for list - %s'),$e->getMessage())); - return; + $this->serverError(sprintf(_('Could not generate feed for list - %s'), $e->getMessage())); } break; @@ -177,13 +172,8 @@ class ApiTimelineListAction extends ApiPrivateAuthAction $this->initDocument('json'); break; default: - $this->clientError( - // TRANS: Client error displayed when coming across a non-supported API method. - _('API method not found.'), - 404, - $this->format - ); - break; + // TRANS: Client error displayed when coming across a non-supported API method. + $this->clientError(_('API method not found.'), 404); } }