diff options
Diffstat (limited to 'modules/gallery/helpers/gallery_rss.php')
-rw-r--r-- | modules/gallery/helpers/gallery_rss.php | 15 |
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; + } } |