X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinepublic.php;h=0fb0788e98795b286daf9b7f37f7d9cf0d92804c;hb=99c0e16844460feb42afecb43e0a5fc9e37624af;hp=7a85042592bd8f527122302a8f4ca0145e168e2d;hpb=4b98edf75f4e255f8c61087bd1525d89653a521f;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinepublic.php b/actions/apitimelinepublic.php index 7a85042592..0fb0788e98 100644 --- a/actions/apitimelinepublic.php +++ b/actions/apitimelinepublic.php @@ -74,6 +74,10 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction parent::prepare($args); $this->notices = $this->getNotices(); + + if ($this->since) { + throw new ServerException("since parameter is disabled for performance; use since_id", 403); + } return true; } @@ -103,6 +107,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction function showTimeline() { $sitename = common_config('site', 'name'); + $sitelogo = (common_config('site', 'logo')) ? common_config('site', 'logo') : Theme::path('logo.png'); $title = sprintf(_("%s public timeline"), $sitename); $taguribase = common_config('integration', 'taguri'); $id = "tag:$taguribase:PublicTimeline"; @@ -114,20 +119,20 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction $this->showXmlTimeline($this->notices); break; case 'rss': - $this->showRssTimeline($this->notices, $title, $link, $subtitle); + $this->showRssTimeline($this->notices, $title, $link, $subtitle, null, $sitelogo); break; case 'atom': $selfuri = common_root_url() . 'api/statuses/public_timeline.atom'; $this->showAtomTimeline( $this->notices, $title, $id, $link, - $subtitle, null, $selfuri + $subtitle, null, $selfuri, $sitelogo ); break; case 'json': $this->showJsonTimeline($this->notices); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } @@ -144,7 +149,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction $notice = Notice::publicStream( ($this->page - 1) * $this->count, $this->count, $this->since_id, - $this->max_id, $this->since + $this->max_id ); while ($notice->fetch()) {