summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-12 08:52:03 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-12 08:52:03 -0700
commitdc6c75cd05b66b030daa9b4088ee69758f71e1e8 (patch)
tree5b73a590849323f573a93b9f4553fa46ddd83340 /modules/gallery/helpers
parentd4d145a44302a1438df7416e3046457bc9582806 (diff)
Move the processing of rss feeds from the rss controller to callbacks in the
modules that are supplying the feed. The rss controller becomes a router. In this change the comment and updates fields are distributed.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_rss.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_rss.php b/modules/gallery/helpers/gallery_rss.php
index 0b87b1b1..98798346 100644
--- a/modules/gallery/helpers/gallery_rss.php
+++ b/modules/gallery/helpers/gallery_rss.php
@@ -24,4 +24,19 @@ class gallery_rss_Core {
"sidebar" => true,
"uri" => "updates"));
}
+
+ static function updates($offset, $limit) {
+ $feed = new stdClass();
+ $feed->data["children"] = ORM::factory("item")
+ ->viewable()
+ ->where("type !=", "album")
+ ->orderby("created", "DESC")
+ ->find_all($limit, $offset);
+ $feed->max_pages = ceil($feed->data["children"]->count() / $limit);
+ $feed->data["title"] = t("Recent Updates");
+ $feed->data["link"] = url::abs_site("albums/1");
+ $feed->data["description"] = t("Recent Updates");
+
+ return $feed;
+ }
}