diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-07-08 00:29:37 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-07-08 00:29:37 +0000 |
commit | c83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (patch) | |
tree | 482cf980e87cd7c80c28a89bb9395eba6b53026f /modules/comment/helpers/comment_rss.php | |
parent | a0b0b415515bff5f9edd43d373e8e78f3b3f8e4d (diff) | |
parent | 9d66783f47636153bf3661d1d89e694dd5188c36 (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/comment/helpers/comment_rss.php')
-rw-r--r-- | modules/comment/helpers/comment_rss.php | 13 |
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(), |