make more things use move_upload_to_archive(), and make that function quieter
git-svn-id: file:///home/shish/svn/shimmie2/trunk@914 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
@ -14,10 +14,7 @@ class PixelFileHandler extends Extension {
|
||||
if(is_a($event, 'DataUploadEvent') && $this->supported_ext($event->type) && $this->check_contents($event->tmpname)) {
|
||||
$hash = $event->hash;
|
||||
$ha = substr($hash, 0, 2);
|
||||
if(!copy($event->tmpname, "images/$ha/$hash")) {
|
||||
$event->veto("Pixel Handler failed to copy file from uploads ({$event->tmpname}) to archive (images/$ha/$hash)");
|
||||
return;
|
||||
}
|
||||
if(!move_upload_to_archive($event)) return;
|
||||
send_event(new ThumbnailGenerationEvent($event->hash, $event->type));
|
||||
$image = $this->create_image_from_data("images/$ha/$hash", $event->metadata);
|
||||
if(is_null($image)) {
|
||||
|
Reference in New Issue
Block a user