summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-10 20:22:19 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-10 20:22:19 -0700
commitd7df3e1681c6b9fc3cf74eb97240932edc15a15f (patch)
treeb0045e5abd91f8911e78b87cf9dbf76bce046e5a /modules
parent5a6fc93496555ad2af73e37fd36979fce2ca3203 (diff)
parent6fbb2c4469730d962b807481f3898e5ffb544abf (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules')
-rw-r--r--modules/rss/helpers/rss_theme.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/rss/helpers/rss_theme.php b/modules/rss/helpers/rss_theme.php
index d47d3313..54bba210 100644
--- a/modules/rss/helpers/rss_theme.php
+++ b/modules/rss/helpers/rss_theme.php
@@ -40,12 +40,16 @@ class rss_theme_Core {
$block->css_id = "gRss";
$block->title = t("Available RSS Feeds");
$block->content = new View("rss_block.html");
- $block->content->feeds = array(
- t("New photos or movies") => url::site("rss/updates"),
- t("All new comments") => url::site("rss/comments"),
- sprintf(t("Comments on %s"),
- $theme->item()->title) => url::site("rss/comments/{$theme->item()->id}")
- );
+ // @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;
return $block;
}
}