Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename "children" to "items" in our feed view because it makes more

semantic sense.
  • Loading branch information...
commit 48af5e6b5039839f93345bef92e1acf7952c50a1 1 parent 74e821b
@bharat bharat authored
View
8 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(
View
66 modules/rss/views/feed.mrss.php
@@ -20,57 +20,57 @@
<? endif ?>
<pubDate><?= $pub_date ?></pubDate>
<lastBuildDate><?= $pub_date ?></lastBuildDate>
- <? foreach ($feed->children as $child): ?>
+ <? foreach ($feed->items as $item): ?>
<item>
- <title><?= html::purify($child->title) ?></title>
- <link><?= url::abs_site("{$child->type}s/{$child->id}") ?></link>
- <guid isPermaLink="true"><?= url::abs_site("{$child->type}s/{$child->id}") ?></guid>
- <pubDate><?= date("D, d M Y H:i:s T", $child->created); ?></pubDate>
- <description><?= html::purify($child->description) ?></description>
+ <title><?= html::purify($item->title) ?></title>
+ <link><?= url::abs_site("{$item->type}s/{$item->id}") ?></link>
+ <guid isPermaLink="true"><?= url::abs_site("{$item->type}s/{$item->id}") ?></guid>
+ <pubDate><?= date("D, d M Y H:i:s T", $item->created); ?></pubDate>
+ <description><?= html::purify($item->description) ?></description>
<content:encoded>
<![CDATA[
- <span><?= html::purify($child->description) ?></span>
+ <span><?= html::purify($item->description) ?></span>
<p>
- <? if ($child->type == "photo"): ?>
- <img alt="" src="<?= $child->resize_url(true) ?>"
- title="<?= html::purify($child->title)->for_html_attr() ?>"
- height="<?= $child->resize_height ?>" width="<?= $child->resize_width ?>" /><br />
+ <? if ($item->type == "photo"): ?>
+ <img alt="" src="<?= $item->resize_url(true) ?>"
+ title="<?= html::purify($item->title)->for_html_attr() ?>"
+ height="<?= $item->resize_height ?>" width="<?= $item->resize_width ?>" /><br />
<? else: ?>
- <a href="<?= url::abs_site("{$child->type}s/{$child->id}") ?>">
- <img alt="" src="<?= $child->thumb_url(true) ?>"
- title="<?= html::purify($child->title)->for_html_attr() ?>"
- height="<?= $child->thumb_height ?>" width="<?= $child->thumb_width ?>" /></a><br />
+ <a href="<?= url::abs_site("{$item->type}s/{$item->id}") ?>">
+ <img alt="" src="<?= $item->thumb_url(true) ?>"
+ title="<?= html::purify($item->title)->for_html_attr() ?>"
+ height="<?= $item->thumb_height ?>" width="<?= $item->thumb_width ?>" /></a><br />
<? endif ?>
- <?= html::purify($child->description) ?>
+ <?= html::purify($item->description) ?>
</p>
]]>
</content:encoded>
- <media:thumbnail url="<?= $child->thumb_url(true) ?>"
- height="<?= $child->thumb_height ?>"
- width="<?= $child->thumb_width ?>"
+ <media:thumbnail url="<?= $item->thumb_url(true) ?>"
+ height="<?= $item->thumb_height ?>"
+ width="<?= $item->thumb_width ?>"
/>
- <? $view_full = access::can("view_full", $child); ?>
- <? if ($child->type == "photo" && $view_full): ?>
+ <? $view_full = access::can("view_full", $item); ?>
+ <? if ($item->type == "photo" && $view_full): ?>
<media:group>
<? endif ?>
- <? if ($child->type == "photo"): ?>
- <media:content url="<?= $child->resize_url(true) ?>"
- fileSize="<?= @filesize($child->resize_path()) ?>"
- type="<?= $child->mime_type ?>"
- height="<?= $child->resize_height ?>"
- width="<?= $child->resize_width ?>"
+ <? if ($item->type == "photo"): ?>
+ <media:content url="<?= $item->resize_url(true) ?>"
+ fileSize="<?= @filesize($item->resize_path()) ?>"
+ type="<?= $item->mime_type ?>"
+ height="<?= $item->resize_height ?>"
+ width="<?= $item->resize_width ?>"
/>
<? endif ?>
<? if ($view_full): ?>
- <media:content url="<?= $child->file_url(true) ?>"
- fileSize="<?= @filesize($child->file_path()) ?>"
- type="<?= $child->mime_type ?>"
- height="<?= $child->height ?>"
- width="<?= $child->width ?>"
+ <media:content url="<?= $item->file_url(true) ?>"
+ fileSize="<?= @filesize($item->file_path()) ?>"
+ type="<?= $item->mime_type ?>"
+ height="<?= $item->height ?>"
+ width="<?= $item->width ?>"
isDefault="true"
/>
<? endif ?>
- <? if ($child->type == "photo" && $view_full): ?>
+ <? if ($item->type == "photo" && $view_full): ?>
</media:group>
<? endif ?>
</item>
View
2  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));
Please sign in to comment.
Something went wrong with that request. Please try again.