diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-14 12:38:57 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-14 12:38:57 -0700 |
commit | 8b7f7a2fbe30c8e17f60177db7f371e1d1f2152c (patch) | |
tree | 34fefe2ef6c7bb7d1168e6df46c623ad04a15441 /modules/gallery/helpers | |
parent | 76b89556fc138dce694178fab9140a8242ea40ec (diff) |
Don't use stdClass to return the feed data. Just use an array.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/gallery_rss.php | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/modules/gallery/helpers/gallery_rss.php b/modules/gallery/helpers/gallery_rss.php index 455e210f..6535d29d 100644 --- a/modules/gallery/helpers/gallery_rss.php +++ b/modules/gallery/helpers/gallery_rss.php @@ -29,16 +29,15 @@ class gallery_rss_Core { } static function updates($offset, $limit) { - $feed = new stdClass(); - $feed->data["children"] = ORM::factory("item") + $feed["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"); + $feed["max_pages"] = ceil($feed["children"]->count() / $limit); + $feed["title"] = t("Recent Updates"); + $feed["link"] = url::abs_site("albums/1"); + $feed["description"] = t("Recent Updates"); return $feed; } @@ -47,14 +46,13 @@ class gallery_rss_Core { $item = ORM::factory("item", $id); access::required("view", $item); - $feed = new stdClass(); - $feed->data["children"] = $item + $feed["children"] = $item ->viewable() ->descendants($limit, $offset, "photo"); - $feed->max_pages = ceil($item->viewable()->descendants_count("photo") / $limit); - $feed->data["title"] = $item->title; - $feed->data["link"] = url::abs_site("albums/{$item->id}"); - $feed->data["description"] = $item->description; + $feed["max_pages"] = ceil($item->viewable()->descendants_count("photo") / $limit); + $feed["title"] = $item->title; + $feed["link"] = url::abs_site("albums/{$item->id}"); + $feed["description"] = $item->description; return $feed; } |