summaryrefslogtreecommitdiff
path: root/actions/showgroup.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-11 11:37:50 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-02-11 11:37:50 -0500
commit22b10399aaa97061ed940f92f5b15f6aacfb1093 (patch)
tree81ddddc5ed3df873f81e7a18c3e2a2e47dc79ff9 /actions/showgroup.php
parentad65c447d5e32b8ef5681789eca12a3717231311 (diff)
Unify feeds definition in actions
I got a little sick of trying to keep the export data and <head> links synched in actions, so I made a common method, getFeeds(), which gets the feeds for both. It returns an array of Feed objects, which know about what their mime type is, title, location, all that jazz. I changed the FeedList class so it handles the new Feed objects instead of the old array of data. I changed all the actions that show feeds (I think...) so that they now use getFeeds() for all their feed needs.
Diffstat (limited to 'actions/showgroup.php')
-rw-r--r--actions/showgroup.php25
1 files changed, 3 insertions, 22 deletions
diff --git a/actions/showgroup.php b/actions/showgroup.php
index 7bc68fbc6..340e18333 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -292,37 +292,18 @@ class ShowgroupAction extends Action
}
/**
- * Show a list of links to feeds this page produces
+ * Get a list of the feeds for this page
*
* @return void
*/
- function showExportData()
- {
- $fl = new FeedList($this);
- $fl->show(array(0=>array('href'=>common_local_url('grouprss',
- array('nickname' => $this->group->nickname)),
- 'type' => 'rss',
- 'version' => 'RSS 1.0',
- 'item' => 'notices')));
- }
-
- /**
- * Show a list of links to feeds this page produces
- *
- * @return void
- */
-
- function showFeeds()
+ function getFeeds()
{
$url =
common_local_url('grouprss',
array('nickname' => $this->group->nickname));
- $this->element('link', array('rel' => 'alternate',
- 'href' => $url,
- 'type' => 'application/rss+xml',
- 'title' => sprintf(_('Notice feed for %s group'),
+ return array(new Feed(Feed::RSS1, $url, sprintf(_('Notice feed for %s group'),
$this->group->nickname)));
}