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!"); - } - - - + } }