summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-11 10:35:15 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-02-11 10:35:15 -0500
commitad65c447d5e32b8ef5681789eca12a3717231311 (patch)
treee016d5bcbe55486ba8bab0e0238e8a86f238fc36 /actions
parent27e23f2dd3e071712dc9d4765beaa33b57150fe0 (diff)
fix Atom link, add Atom and RSS 2.0 to <head>
Diffstat (limited to 'actions')
-rw-r--r--actions/public.php22
1 files changed, 18 insertions, 4 deletions
diff --git a/actions/public.php b/actions/public.php
index cc6537f74..1137bd876 100644
--- a/actions/public.php
+++ b/actions/public.php
@@ -73,9 +73,9 @@ class PublicAction extends Action
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
-
+
common_set_returnto($this->selfUrl());
-
+
return true;
}
@@ -123,8 +123,20 @@ class PublicAction extends Action
{
$this->element('link', array('rel' => 'alternate',
'href' => common_local_url('publicrss'),
+ 'type' => 'application/rdf+xml',
+ 'title' => _('Public Stream Feed (RSS 1.0)')));
+ $this->element('link', array('rel' => 'alternate',
+ 'href' => common_local_url('api',
+ array('apiaction' => 'statuses',
+ 'method' => 'public_timeline.rss')),
'type' => 'application/rss+xml',
- 'title' => _('Public Stream Feed')));
+ 'title' => _('Public Stream Feed (RSS 2.0)')));
+ $this->element('link', array('rel' => 'alternate',
+ 'href' => common_local_url('api',
+ array('apiaction' => 'statuses',
+ 'method' => 'public_timeline.atom')),
+ 'type' => 'application/atom+xml',
+ 'title' => _('Public Stream Feed (Atom)')));
}
/**
@@ -200,7 +212,9 @@ class PublicAction extends Action
'type' => 'rss',
'version' => 'RSS 1.0',
'item' => 'publicrss'),
- 1 => array('href' => common_local_url('publicatom'),
+ 1 => array('href' => common_local_url('api',
+ array('apiaction' => 'statuses',
+ 'method' => 'public_timeline.atom')),
'type' => 'atom',
'version' => 'Atom 1.0',
'item' => 'publicatom')));