From 7d96035f02e5625617fd49b29b37fb03b85d09cf Mon Sep 17 00:00:00 2001
From: Shish <shish@shishnet.org>
Date: Fri, 23 Oct 2009 14:26:49 +0100
Subject: [PATCH] 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");
 	}