X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpublic.php;h=5fc547feaf632613a04d11a647c51b5afdd49588;hb=c4a8a6776e29a8ba96eec15a3d443ca17889be8b;hp=73fad182a3f2ab71e7452f349637826dfb95d2d9;hpb=c012b278f00664470e74a0009791e8b2bca2a5e3;p=quix0rs-gnu-social.git diff --git a/actions/public.php b/actions/public.php index 73fad182a3..5fc547feaf 100644 --- a/actions/public.php +++ b/actions/public.php @@ -80,7 +80,7 @@ class PublicAction extends Action $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; if ($this->page > MAX_PUBLIC_PAGE) { - $this->clientError(sprintf(_("Beyond the page limit (%s)"), MAX_PUBLIC_PAGE)); + $this->clientError(sprintf(_("Beyond the page limit (%s)."), MAX_PUBLIC_PAGE)); } common_set_returnto($this->selfUrl()); @@ -94,7 +94,8 @@ class PublicAction extends Action } if($this->page > 1 && $this->notice->N == 0){ - $this->serverError(_('No such page'),$code=404); + // TRANS: Server error when page not found (404) + $this->serverError(_('No such page.'),$code=404); } return true; @@ -132,6 +133,21 @@ class PublicAction extends Action } } + function extraHead() + { + parent::extraHead(); + $this->element('meta', array('http-equiv' => 'X-XRDS-Location', + 'content' => common_local_url('publicxrds'))); + + $rsd = common_local_url('rsd'); + + // RSD, http://tales.phrasewise.com/rfc/rsd + + $this->element('link', array('rel' => 'EditURI', + 'type' => 'application/rsd+xml', + 'href' => $rsd)); + } + /** * Output elements for RSS and Atom feeds * @@ -143,14 +159,12 @@ class PublicAction extends Action return array(new Feed(Feed::RSS1, common_local_url('publicrss'), _('Public Stream Feed (RSS 1.0)')), new Feed(Feed::RSS2, - common_local_url('api', - array('apiaction' => 'statuses', - 'method' => 'public_timeline.rss')), + common_local_url('ApiTimelinePublic', + array('format' => 'rss')), _('Public Stream Feed (RSS 2.0)')), new Feed(Feed::ATOM, - common_local_url('api', - array('apiaction' => 'statuses', - 'method' => 'public_timeline.atom')), + common_local_url('ApiTimelinePublic', + array('format' => 'atom')), _('Public Stream Feed (Atom)'))); }