summaryrefslogtreecommitdiff
path: root/modules/comment/helpers/comment_rss.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/helpers/comment_rss.php')
-rw-r--r--modules/comment/helpers/comment_rss.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php
index eee6f750..26d98d21 100644
--- a/modules/comment/helpers/comment_rss.php
+++ b/modules/comment/helpers/comment_rss.php
@@ -35,19 +35,22 @@ class comment_rss_Core {
$comments = ORM::factory("comment")
->viewable()
- ->where("state", "=", "published")
- ->order_by("created", "DESC");
+ ->where("comments.state", "=", "published")
+ ->order_by("comments.created", "DESC");
if ($feed_id == "item") {
- $comments->where("item_id", "=", $id);
+ $item = ORM::factory("item", $id);
+ $comments
+ ->where("items.left_ptr", ">=", $item->left_ptr)
+ ->where("items.right_ptr", "<=", $item->right_ptr);
}
$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(),