From 3a9063b02b003fa10846ec4bcc0f8523a892bd2e Mon Sep 17 00:00:00 2001 From: shish Date: Fri, 4 Apr 2008 22:41:45 +0000 Subject: [PATCH] trunk also <_< git-svn-id: file:///home/shish/svn/shimmie2/trunk@755 7f39781d-f577-437e-ae19-be835c7a54ca --- contrib/image_hash_ban/main.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/contrib/image_hash_ban/main.php b/contrib/image_hash_ban/main.php index dab6d57a..918bace7 100644 --- a/contrib/image_hash_ban/main.php +++ b/contrib/image_hash_ban/main.php @@ -43,20 +43,15 @@ class Image_Hash_Ban extends Extension { } - if(is_a($event, 'UploadingImageEvent')) { - - global $database; - + if(is_a($event, 'DataUploadEvent')) { + global $database; $image = $event->image; $tmp_hash = $image->hash; if ($database->db->GetOne("SELECT COUNT(*) FROM image_bans WHERE hash = ?", $tmp_hash) == 1) { $event->veto("This image has been banned!"); - } - - - + } }