summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_rss.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2011-07-12 21:44:40 -0700
committerTim Almdal <tnalmdal@shaw.ca>2011-07-12 21:44:40 -0700
commit51726f9e4b8372c40b27f843fca7b783e6db9623 (patch)
treefcc60c8caad19bbbb01043915103e85b33f31d6a /modules/gallery/helpers/gallery_rss.php
parente8382b960a3c19bb28140833e348e6c9c9db8a8a (diff)
Fix for ticket #1752. Add an RSS field link for the current album. Or, in the case of a photo or movie, add a link to the rss field of the parent album.
Diffstat (limited to 'modules/gallery/helpers/gallery_rss.php')
-rw-r--r--modules/gallery/helpers/gallery_rss.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_rss.php b/modules/gallery/helpers/gallery_rss.php
index 612872e6..9af67118 100644
--- a/modules/gallery/helpers/gallery_rss.php
+++ b/modules/gallery/helpers/gallery_rss.php
@@ -21,6 +21,14 @@
class gallery_rss_Core {
static function available_feeds($item, $tag) {
$feeds["gallery/latest"] = t("Latest photos and movies");
+
+ if ($item) {
+ $feed_item = $item -> is_album() ? $item : $item->parent();
+
+ $feeds["gallery/album/{$feed_item->id}"] =
+ t("%title photos and movies", array("title" => $feed_item->title));
+ }
+
return $feeds;
}