summaryrefslogtreecommitdiff
path: root/actions/public.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/public.php')
-rw-r--r--actions/public.php43
1 files changed, 15 insertions, 28 deletions
diff --git a/actions/public.php b/actions/public.php
index cc6537f74..a20ae4032 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;
}
@@ -119,12 +119,20 @@ class PublicAction extends Action
* @return void
*/
- function showFeeds()
+ function getFeeds()
{
- $this->element('link', array('rel' => 'alternate',
- 'href' => common_local_url('publicrss'),
- 'type' => 'application/rss+xml',
- 'title' => _('Public Stream Feed')));
+ 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')),
+ _('Public Stream Feed (RSS 2.0)')),
+ new Feed(Feed::ATOM,
+ common_local_url('api',
+ array('apiaction' => 'statuses',
+ 'method' => 'public_timeline.atom')),
+ _('Public Stream Feed (Atom)')));
}
/**
@@ -185,27 +193,6 @@ class PublicAction extends Action
$this->page, 'public');
}
- /**
- * Makes a list of exported feeds for this page
- *
- * @return void
- *
- * @todo I18N
- */
-
- function showExportData()
- {
- $fl = new FeedList($this);
- $fl->show(array(0 => array('href' => common_local_url('publicrss'),
- 'type' => 'rss',
- 'version' => 'RSS 1.0',
- 'item' => 'publicrss'),
- 1 => array('href' => common_local_url('publicatom'),
- 'type' => 'atom',
- 'version' => 'Atom 1.0',
- 'item' => 'publicatom')));
- }
-
function showSections()
{
// $top = new TopPostersSection($this);