diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-11 15:44:34 +0800 |
---|---|---|
committer | <unostar@danalan.info> | 2009-06-12 21:21:55 +0800 |
commit | 4bd82c11670cf9c75ed9f9a1da31e0873a46ed9d (patch) | |
tree | 3e78461c556c7837ddf561ca894cdd0b0d70a1f6 /modules/rss/helpers/rss_theme.php | |
parent | f578906d33234fea363bb7b893ffe23ae8c81db3 (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.
Signed-off-by: <unostar@danalan.info>
Diffstat (limited to 'modules/rss/helpers/rss_theme.php')
-rw-r--r-- | modules/rss/helpers/rss_theme.php | 13 |
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; } } |