From 2e24246984638b3b5c86bd658582f51b02e8eb34 Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 23 Oct 2009 14:26:40 +0100 Subject: [PATCH 1/2] test for bug #779 --- ext/comment/test.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/comment/test.php b/ext/comment/test.php index 9bb9d139..c8a26e0b 100644 --- a/ext/comment/test.php +++ b/ext/comment/test.php @@ -52,6 +52,10 @@ class CommentListTest extends ShimmieWebTestCase { $this->log_in_as_admin(); $this->delete_image($image_id); $this->log_out(); + + $this->get_page('comment/list'); + $this->assert_title('Comments'); + $this->assert_no_text('ASDFASDF'); } function testSingleDel() { From 7d96035f02e5625617fd49b29b37fb03b85d09cf Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 23 Oct 2009 14:26:49 +0100 Subject: [PATCH 2/2] fix for bug #779 --- ext/comment/main.php | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/comment/main.php b/ext/comment/main.php index 09aa199b..5ce56211 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -162,6 +162,7 @@ class CommentList extends SimpleExtension { public function onImageDeletion($event) { global $database; + $image_id = $event->image->id; $database->Execute("DELETE FROM comments WHERE image_id=?", array($image_id)); log_info("comment", "Deleting all comments for Image #$image_id"); }