summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-14 15:58:02 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-14 15:58:02 -0700
commit47bc53eb5c328254d431caebf8acfd2636969bb4 (patch)
tree26ecfe8531fd043941cda81673af961a27e8cc85 /modules/tag/helpers
parentdc3ed06cd76ebc7b949865be789fb26590d63ed0 (diff)
parentf18fb934427ce09896b51d49520b04fba0f1dd44 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag_rss.php13
-rw-r--r--modules/tag/helpers/tag_theme.php6
2 files changed, 11 insertions, 8 deletions
diff --git a/modules/tag/helpers/tag_rss.php b/modules/tag/helpers/tag_rss.php
index ace7fd6a..3d6399ca 100644
--- a/modules/tag/helpers/tag_rss.php
+++ b/modules/tag/helpers/tag_rss.php
@@ -21,7 +21,7 @@
class tag_rss_Core {
static function available_feeds($item) {
return array(array("description" => t("Tag Album feed"),
- "sidebar" => false,
+ "type" => "head",
"uri" => "tags"));
}
@@ -31,12 +31,11 @@ class tag_rss_Core {
return Kohana::show_404();
}
- $feed = new stdClass();
- $feed->data["children"] = $tag->items($limit, $offset, "photo");
- $feed->max_pages = ceil($tag->count / $limit);
- $feed->data["title"] = $tag->name;
- $feed->data["link"] = url::abs_site("tags/{$tag->id}");
- $feed->data["description"] = t("Photos related to %tag_name", array("tag_name" => $tag->name));
+ $feed["children"] = $tag->items($limit, $offset, "photo");
+ $feed["max_pages"] = ceil($tag->count / $limit);
+ $feed["title"] = $tag->name;
+ $feed["link"] = url::abs_site("tags/{$tag->id}");
+ $feed["description"] = t("Photos related to %tag_name", array("tag_name" => $tag->name));
return $feed;
}
diff --git a/modules/tag/helpers/tag_theme.php b/modules/tag/helpers/tag_theme.php
index a32d71b6..45f55986 100644
--- a/modules/tag/helpers/tag_theme.php
+++ b/modules/tag/helpers/tag_theme.php
@@ -20,7 +20,11 @@
class tag_theme_Core {
static function head($theme) {
$url = url::file("modules/tag/js/tag.js");
- return "<script src=\"$url\" type=\"text/javascript\"></script>";
+ $head[] = "<script src=\"$url\" type=\"text/javascript\"></script>";
+ if ($theme->tag() && module::is_active("rss")) {
+ $head[] = rss::feed_link("tags/{$theme->tag()->id}");
+ }
+ return implode("\n", $head);
}
static function sidebar_blocks($theme) {