Delete images properly on error

This commit is contained in:
Savetheinternet 2011-02-19 19:28:07 +11:00
parent 73746b7c8d
commit 13ef38d7b7
2 changed files with 10 additions and 2 deletions

View file

@ -1122,7 +1122,14 @@
return $res;
}
function undoImage($post) {
unlink($post['file']);
unlink($post['thumb']);
}
function createimage($type, $source_pic) {
global $config;
$image = false;
switch($type) {
case 'jpg':