From a2d2ceb01523fb1a9a3f30b14cda8e3684cb61ef Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 10 Mar 2012 19:07:40 +0000 Subject: [PATCH] foreign keys delete comments now --- ext/comment/main.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ext/comment/main.php b/ext/comment/main.php index 1cbf888a..c5c84226 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -194,13 +194,6 @@ class CommentList extends Extension { ); } - public function onImageDeletion(ImageDeletionEvent $event) { - global $database; - $image_id = $event->image->id; - $database->Execute("DELETE FROM comments WHERE image_id=:image_id", array("image_id"=>$image_id)); - log_info("comment", "Deleting all comments for Image #$image_id"); - } - // TODO: split akismet into a separate class, which can veto the event public function onCommentPosting(CommentPostingEvent $event) { $this->add_comment_wrapper($event->image_id, $event->user, $event->comment);