Permalink
Browse files

Rename the feed variable from "children" to "comments" since that

makes more semantic sense.
  • Loading branch information...
1 parent 261da7b commit 74e821b03ef149a43eb8704fd2350985699d3ded @bharat bharat committed Jun 21, 2010
Showing with 11 additions and 11 deletions.
  1. +2 −2 modules/comment/helpers/comment_rss.php
  2. +9 −9 modules/comment/views/comment.mrss.php
View
4 modules/comment/helpers/comment_rss.php
@@ -47,10 +47,10 @@ static function feed($feed_id, $offset, $limit, $id) {
$feed = new stdClass();
$feed->view = "comment.mrss";
- $feed->children = array();
+ $feed->comments = array();
foreach ($comments->find_all($limit, $offset) as $comment) {
$item = $comment->item();
- $feed->children[] = new ArrayObject(
+ $feed->comments[] = new ArrayObject(
array("pub_date" => date("D, d M Y H:i:s T", $comment->created),
"text" => nl2br(html::purify($comment->text)),
"thumb_url" => $item->thumb_url(),
View
18 modules/comment/views/comment.mrss.php
@@ -20,19 +20,19 @@
<? endif ?>
<pubDate><?= $pub_date ?></pubDate>
<lastBuildDate><?= $pub_date ?></lastBuildDate>
- <? foreach ($feed->children as $child): ?>
+ <? foreach ($feed->comments as $comment): ?>
<item>
- <title><?= html::purify($child->title) ?></title>
- <link><?= html::clean($child->item_uri) ?></link>
- <author><?= html::clean($child->author) ?></author>
- <guid isPermaLink="true"><?= $child->item_uri ?></guid>
- <pubDate><?= $child->pub_date ?></pubDate>
+ <title><?= html::purify($comment->title) ?></title>
+ <link><?= html::clean($comment->item_uri) ?></link>
+ <author><?= html::clean($comment->author) ?></author>
+ <guid isPermaLink="true"><?= $comment->item_uri ?></guid>
+ <pubDate><?= $comment->pub_date ?></pubDate>
<content:encoded>
<![CDATA[
- <p><?= nl2br(html::purify($child->text)) ?></p>
+ <p><?= nl2br(html::purify($comment->text)) ?></p>
<p>
- <img alt="" src="<?= $child->thumb_url ?>"
- height="<?= $child->thumb_height ?>" width="<?= $child->thumb_width ?>" />
+ <img alt="" src="<?= $comment->thumb_url ?>"
+ height="<?= $comment->thumb_height ?>" width="<?= $comment->thumb_width ?>" />
<br />
</p>
]]>

0 comments on commit 74e821b

Please sign in to comment.