summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/comment/helpers/comment_rss.php8
-rw-r--r--modules/gallery/helpers/photo.php2
2 files changed, 8 insertions, 2 deletions
diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php
index eee6f750..479023bd 100644
--- a/modules/comment/helpers/comment_rss.php
+++ b/modules/comment/helpers/comment_rss.php
@@ -39,7 +39,13 @@ class comment_rss_Core {
->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();
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"))