summaryrefslogtreecommitdiff
path: root/actions/showstream.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-02-11 16:53:01 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-02-11 16:53:01 +0000
commit012288bdf6f4ad41c861504c05b2ac1cee834dd3 (patch)
tree39482829b98bcf1ac9e6e8b1ce74d8c80afc5a25 /actions/showstream.php
parentfc293545be13473d992b512141be233c2963f6da (diff)
parent22b10399aaa97061ed940f92f5b15f6aacfb1093 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'actions/showstream.php')
-rw-r--r--actions/showstream.php67
1 files changed, 24 insertions, 43 deletions
diff --git a/actions/showstream.php b/actions/showstream.php
index bd6f4153b..c736c99b5 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -155,54 +155,35 @@ class ShowstreamAction extends Action
return;
}
- function showExportData()
+ function getFeeds()
{
- $fl = new FeedList($this);
- $fl->show(array(0=>array('href'=>common_local_url('userrss',
- array('nickname' => $this->user->nickname)),
- 'type' => 'rss',
- 'version' => 'RSS 1.0',
- 'item' => 'notices'),
- 1=>array('href'=>common_local_url('usertimeline',
- array('nickname' => $this->user->nickname)),
- 'type' => 'atom',
- 'version' => 'Atom 1.0',
- 'item' => 'usertimeline'),
- 2=>array('href'=>common_local_url('foaf',
- array('nickname' => $this->user->nickname)),
- 'type' => 'rdf',
- 'version' => 'FOAF',
- 'item' => 'foaf')));
- }
-
- function showFeeds()
- {
- $this->element('link', array('rel' => 'alternate',
- 'type' => 'application/rss+xml',
- 'href' => common_local_url('userrss',
- array('nickname' => $this->user->nickname)),
- 'title' => sprintf(_('Notice feed for %s (RSS)'),
- $this->user->nickname)));
-
- $this->element('link',
- array('rel' => 'alternate',
- 'href' => common_local_url('api',
- array('apiaction' => 'statuses',
- 'method' => 'user_timeline.atom',
- 'argument' => $this->user->nickname)),
- 'type' => 'application/atom+xml',
- 'title' => sprintf(_('Notice feed for %s (Atom)'),
- $this->user->nickname)));
+ return array(new Feed(Feed::RSS1,
+ common_local_url('userrss',
+ array('nickname' => $this->user->nickname)),
+ sprintf(_('Notice feed for %s (RSS 1.0)'),
+ $this->user->nickname)),
+ new Feed(Feed::RSS2,
+ common_local_url('api',
+ array('apiaction' => 'statuses',
+ 'method' => 'user_timeline',
+ 'argument' => $this->user->nickname.'.rss')),
+ sprintf(_('Notice feed for %s (RSS 2.0)'),
+ $this->user->nickname)),
+ new Feed(Feed::ATOM,
+ common_local_url('api',
+ array('apiaction' => 'statuses',
+ 'method' => 'user_timeline',
+ 'argument' => $this->user->nickname.'.atom')),
+ sprintf(_('Notice feed for %s (Atom)'),
+ $this->user->nickname)),
+ new Feed(Feed::FOAF,
+ common_local_url('foaf', array('nickname' =>
+ $this->user->nickname)),
+ sprintf(_('FOAF for %s'), $this->user->nickname)));
}
function extraHead()
{
- // FOAF
- $this->element('link', array('rel' => 'meta',
- 'href' => common_local_url('foaf', array('nickname' =>
- $this->user->nickname)),
- 'type' => 'application/rdf+xml',
- 'title' => 'FOAF'));
// for remote subscriptions etc.
$this->element('meta', array('http-equiv' => 'X-XRDS-Location',
'content' => common_local_url('xrds', array('nickname' =>