diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/helpers/gallery_rss.php | 8 | ||||
-rw-r--r-- | modules/rss/views/feed.mrss.php | 66 | ||||
-rw-r--r-- | 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 9c528c0e..bec34912 100644 --- a/modules/gallery/helpers/gallery_rss.php +++ b/modules/gallery/helpers/gallery_rss.php @@ -28,18 +28,18 @@ class gallery_rss_Core { $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 @@ class gallery_rss_Core { $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 0fd8095d..3f0010bb 100644 --- a/modules/rss/views/feed.mrss.php +++ b/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> diff --git a/modules/tag/helpers/tag_rss.php b/modules/tag/helpers/tag_rss.php index 7d52814b..ea3865be 100644 --- a/modules/tag/helpers/tag_rss.php +++ b/modules/tag/helpers/tag_rss.php @@ -36,7 +36,7 @@ class tag_rss_Core { } $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)); |