summaryrefslogtreecommitdiff
path: root/modules/rss/helpers/rss_theme.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-11 00:44:34 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-11 00:44:34 -0700
commit1272d0837eeefb96af69bbb24a93b05cc818837f (patch)
treee5cf2e3d9d64e79e2912fa8e5a35894018e6290b /modules/rss/helpers/rss_theme.php
parent68fd196d66e2d21f571ff3b5a673f18cd129abf9 (diff)
Changed rss_theme::sidebar_blocks to fire the event "request_feed_links" to
allow modules to contribute rss feed links to the rss sidebar block. Ticket #388.
Diffstat (limited to 'modules/rss/helpers/rss_theme.php')
-rw-r--r--modules/rss/helpers/rss_theme.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/modules/rss/helpers/rss_theme.php b/modules/rss/helpers/rss_theme.php
index 54bba210..185d9d45 100644
--- a/modules/rss/helpers/rss_theme.php
+++ b/modules/rss/helpers/rss_theme.php
@@ -43,13 +43,12 @@ class rss_theme_Core {
// @todo consider pushing the code for the feeds back to the associated modules
// and create an event 'generate_rss_feeds' that modules can respond to create
// the list of feeds.
- $feeds = array(t("New photos or movies") => url::site("rss/updates"));
- if (module::is_active("comment")) {
- $feeds[t("All new comments")] = url::site("rss/comments");
- $feeds[sprintf(t("Comments on %s"), $theme->item()->title)] =
- url::site("rss/comments/{$theme->item()->id}");
- }
- $block->content->feeds = $feeds;
+ $event_data = new stdClass();
+ $event_data->feeds = array();
+ $event_data->item = $theme->item();
+
+ module::event("request_feed_links", $event_data);
+ $block->content->feeds = $event_data->feeds;
return $block;
}
}