summaryrefslogtreecommitdiff
path: root/modules/rss/helpers/rss_theme.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-11 21:19:13 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-11 21:19:13 -0700
commitf369b8fabfdffe475464827d6225b2d4895aadb5 (patch)
treed0b9fb7622ab8b2fc5464ce9cb82674a3adeae75 /modules/rss/helpers/rss_theme.php
parent0b23433d947bb986db9b1d5775631306e23ed1f4 (diff)
parent4877f968b4d92c69e2fbecef6c6b1666b8af67f8 (diff)
Merge branch 'master' of git@github.com:talmdal/gallery3
Diffstat (limited to 'modules/rss/helpers/rss_theme.php')
-rw-r--r--modules/rss/helpers/rss_theme.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/modules/rss/helpers/rss_theme.php b/modules/rss/helpers/rss_theme.php
index 54bba210..b433c66a 100644
--- a/modules/rss/helpers/rss_theme.php
+++ b/modules/rss/helpers/rss_theme.php
@@ -36,20 +36,17 @@ class rss_theme_Core {
return;
}
+ $event_data = new stdClass();
+ $event_data->feeds = array();
+ $event_data->item = $theme->item();
+ module::event("request_feed_links", $event_data);
+
$block = new Block();
$block->css_id = "gRss";
$block->title = t("Available RSS Feeds");
$block->content = new View("rss_block.html");
- // @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;
+ $block->content->feeds = $event_data->feeds;
+
return $block;
}
}