handle errors in the add-to-database part of uploads (eg hash collisons)

git-svn-id: file:///home/shish/svn/shimmie2/trunk@633 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-12-08 02:48:50 +00:00
parent 6c20105aff
commit 292c6a73a6

View File

@ -24,7 +24,13 @@ class PixelFileHandler extends Extension {
$event->veto("Pixel Handler failed to create image object from data"); $event->veto("Pixel Handler failed to create image object from data");
return; return;
} }
send_event(new ImageAdditionEvent($event->user, $image));
$iae = new ImageAdditionEvent($event->user, $image);
send_event($iae);
if($iae->vetoed) {
$event->veto($iae->veto_reason);
return;
}
} }
if(is_a($event, 'ThumbnailGenerationEvent') && $this->supported_ext($event->type)) { if(is_a($event, 'ThumbnailGenerationEvent') && $this->supported_ext($event->type)) {