From 1fb33393269d3a1d32048898545c5ef812383f2e Mon Sep 17 00:00:00 2001 From: Jan Koprowski Date: Wed, 16 Jun 2010 14:29:28 +0800 Subject: Fix issue1068. Fill from_id field in photo with indetificator --- modules/gallery/helpers/photo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php index f20d37a3..73cd60c0 100644 --- a/modules/gallery/helpers/photo.php +++ b/modules/gallery/helpers/photo.php @@ -26,7 +26,7 @@ class photo_Core { static function get_edit_form($photo) { $form = new Forge("photos/update/$photo->id", "", "post", array("id" => "g-edit-photo-form")); - $form->hidden("from_id"); + $form->hidden("from_id")->value($photo->id); $group = $form->group("edit_item")->label(t("Edit Photo")); $group->input("title")->label(t("Title"))->value($photo->title) ->error_messages("required", t("You must provide a title")) -- cgit v1.2.3 From ea8653f9470ceb09a4d5ddca2aec023f2f7fe5a2 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 16 Jun 2010 08:39:09 -0700 Subject: Fix for ticket #1131. If the rss feed is for an item, then retrieve the item. Using the left and right pointers find all the comments for the child items. Thanks to jankoprowski for the initial investigation. --- modules/comment/helpers/comment_rss.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php index eee6f750..a18beb9b 100644 --- a/modules/comment/helpers/comment_rss.php +++ b/modules/comment/helpers/comment_rss.php @@ -33,13 +33,20 @@ class comment_rss_Core { return; } + Kohana_Log::add("error", "feed($feed_id, $offset, $limit, $id)"); $comments = ORM::factory("comment") ->viewable() ->where("state", "=", "published") ->order_by("created", "DESC"); if ($feed_id == "item") { - $comments->where("item_id", "=", $id); + $item = ORM::factory("item", $id); + $subquery = db::select("id") + ->from("items") + ->where("left_ptr", ">=", $item->left_ptr) + ->where("right_ptr", "<=", $item->right_ptr); + $comments + ->where("item_id", "in", $subquery); } $feed = new stdClass(); -- cgit v1.2.3 From 8ee60e6b5d694a8117c94595a0f03090cd41cca8 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 16 Jun 2010 11:17:18 -0700 Subject: slap my wrist... i forgot a debugging statement --- modules/comment/helpers/comment_rss.php | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php index a18beb9b..479023bd 100644 --- a/modules/comment/helpers/comment_rss.php +++ b/modules/comment/helpers/comment_rss.php @@ -33,7 +33,6 @@ class comment_rss_Core { return; } - Kohana_Log::add("error", "feed($feed_id, $offset, $limit, $id)"); $comments = ORM::factory("comment") ->viewable() ->where("state", "=", "published") -- cgit v1.2.3