summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_rss.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-09-04 13:40:39 -0700
committerBharat Mediratta <bharat@menalto.com>2010-09-04 13:40:39 -0700
commitdb75ac642a6ff62e814929af99e7c9af4d492706 (patch)
tree1a4c9c9d5a6d5d221402f92d8ae188a5a21687d4 /modules/gallery/helpers/gallery_rss.php
parent32d18920680ee63dc75c3a2b710ef805b31c127c (diff)
Use the title of the root album as the site title for all RSS feeds.
Fixes ticket #1307.
Diffstat (limited to 'modules/gallery/helpers/gallery_rss.php')
-rw-r--r--modules/gallery/helpers/gallery_rss.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_rss.php b/modules/gallery/helpers/gallery_rss.php
index bec34912..fb617934 100644
--- a/modules/gallery/helpers/gallery_rss.php
+++ b/modules/gallery/helpers/gallery_rss.php
@@ -40,7 +40,7 @@ class gallery_rss_Core {
->order_by("created", "DESC");
$feed->max_pages = ceil($all_items->find_all()->count() / $limit);
- $feed->title = t("Recent updates");
+ $feed->title = t("%site_title - Recent updates", array("site_title" => item::root()->title));
$feed->description = t("Recent updates");
return $feed;
@@ -53,7 +53,13 @@ class gallery_rss_Core {
->descendants($limit, $offset, array(array("type", "=", "photo")));
$feed->max_pages = ceil(
$item->viewable()->descendants_count(array(array("type", "=", "photo"))) / $limit);
- $feed->title = html::purify($item->title);
+ if ($item->id == item::root()->id) {
+ $feed->title = html::purify($item->title);
+ } else {
+ $feed->title = t("%site_title - %item_title",
+ array("site_title" => item::root()->title,
+ "item_title" => $item->title));
+ }
$feed->description = nl2br(html::purify($item->description));
return $feed;