diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-06-15 07:40:57 +0800 |
---|---|---|
committer | <unostar@danalan.info> | 2009-06-15 17:31:17 +0800 |
commit | 3b684655e2afcb6d24885c98a7821db4d6db4e07 (patch) | |
tree | 4ece424ef273b93cbb4ef75cc2ef63f5891057bb /modules/tag | |
parent | 2ecb00c492c1312e7214c5bb1c2d256225cf2c73 (diff) |
Refactor feed code to use stdClass everywhere. Fix bugs in the
max-pages calculation code. Move feed related data into the $feed
variable and only pass that to the view.
Signed-off-by: <unostar@danalan.info>
Diffstat (limited to 'modules/tag')
-rw-r--r-- | modules/tag/helpers/tag_rss.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/tag/helpers/tag_rss.php b/modules/tag/helpers/tag_rss.php index 3d6399ca..dbef3914 100644 --- a/modules/tag/helpers/tag_rss.php +++ b/modules/tag/helpers/tag_rss.php @@ -21,7 +21,6 @@ class tag_rss_Core { static function available_feeds($item) { return array(array("description" => t("Tag Album feed"), - "type" => "head", "uri" => "tags")); } @@ -31,11 +30,11 @@ class tag_rss_Core { return Kohana::show_404(); } - $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)); + $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; } |