From 48af5e6b5039839f93345bef92e1acf7952c50a1 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 20 Jun 2010 17:25:23 -0700 Subject: [PATCH] Rename "children" to "items" in our feed view because it makes more semantic sense. --- modules/gallery/helpers/gallery_rss.php | 8 +-- modules/rss/views/feed.mrss.php | 66 ++++++++++++------------- modules/tag/helpers/tag_rss.php | 2 +- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/modules/gallery/helpers/gallery_rss.php b/modules/gallery/helpers/gallery_rss.php index 9c528c0e68..bec349127e 100644 --- a/modules/gallery/helpers/gallery_rss.php +++ b/modules/gallery/helpers/gallery_rss.php @@ -28,18 +28,18 @@ static function feed($feed_id, $offset, $limit, $id) { $feed = new stdClass(); switch ($feed_id) { case "latest": - $feed->children = ORM::factory("item") + $feed->items = ORM::factory("item") ->viewable() ->where("type", "<>", "album") ->order_by("created", "DESC") ->find_all($limit, $offset); - $all_children = ORM::factory("item") + $all_items = ORM::factory("item") ->viewable() ->where("type", "<>", "album") ->order_by("created", "DESC"); - $feed->max_pages = ceil($all_children->find_all()->count() / $limit); + $feed->max_pages = ceil($all_items->find_all()->count() / $limit); $feed->title = t("Recent updates"); $feed->description = t("Recent updates"); return $feed; @@ -48,7 +48,7 @@ static function feed($feed_id, $offset, $limit, $id) { $item = ORM::factory("item", $id); access::required("view", $item); - $feed->children = $item + $feed->items = $item ->viewable() ->descendants($limit, $offset, array(array("type", "=", "photo"))); $feed->max_pages = ceil( diff --git a/modules/rss/views/feed.mrss.php b/modules/rss/views/feed.mrss.php index 0fd8095dc5..3f0010bb58 100644 --- a/modules/rss/views/feed.mrss.php +++ b/modules/rss/views/feed.mrss.php @@ -20,57 +20,57 @@ - children as $child): ?> + items as $item): ?> - <?= html::purify($child->title) ?> - type}s/{$child->id}") ?> - type}s/{$child->id}") ?> - created); ?> - description) ?> + <?= html::purify($item->title) ?> + type}s/{$item->id}") ?> + type}s/{$item->id}") ?> + created); ?> + description) ?> description) ?> + description) ?>

- type == "photo"): ?> -
+ type == "photo"): ?> +
- type}s/{$child->id}") ?>"> -
+ type}s/{$item->id}") ?>"> +
- description) ?> + description) ?>

]]>
- - - type == "photo" && $view_full): ?> + + type == "photo" && $view_full): ?> - type == "photo"): ?> - type == "photo"): ?> + - - type == "photo" && $view_full): ?> + type == "photo" && $view_full): ?>
diff --git a/modules/tag/helpers/tag_rss.php b/modules/tag/helpers/tag_rss.php index 7d52814b05..ea3865bebb 100644 --- a/modules/tag/helpers/tag_rss.php +++ b/modules/tag/helpers/tag_rss.php @@ -36,7 +36,7 @@ static function feed($feed_id, $offset, $limit, $id) { } $feed = new stdClass(); - $feed->children = $tag->items($limit, $offset, "photo"); + $feed->items = $tag->items($limit, $offset, "photo"); $feed->max_pages = ceil($tag->count / $limit); $feed->title = $tag->name; $feed->description = t("Photos related to %tag_name", array("tag_name" => $tag->name));