Fix files not being saved in certain cases (#483)
This commit is contained in:
parent
ffcc496a6f
commit
74b9a4fd50
19
post.php
19
post.php
|
@ -1046,6 +1046,8 @@ if (isset($_POST['delete'])) {
|
|||
|
||||
$thumb->_destroy();
|
||||
}
|
||||
|
||||
$dont_copy_file = false;
|
||||
|
||||
if ($config['redraw_image'] || (!array_key_exists('exif_stripped', $file) && $config['strip_exif'] && ($file['extension'] == 'jpg' || $file['extension'] == 'jpeg'))) {
|
||||
if (!$config['redraw_image'] && $config['use_exiftool']) {
|
||||
|
@ -1079,16 +1081,15 @@ if (isset($_POST['delete'])) {
|
|||
$file['thumbheight'] = $size[1];
|
||||
$file['width'] = $size[0];
|
||||
$file['height'] = $size[1];
|
||||
}
|
||||
else {
|
||||
// not an image
|
||||
$file['thumb'] = 'file';
|
||||
|
||||
$size = @getimagesize(sprintf($config['file_thumb'],
|
||||
} else {
|
||||
// not an image
|
||||
$file['thumb'] = 'file';
|
||||
$size = @getimagesize(sprintf($config['file_thumb'],
|
||||
isset($config['file_icons'][$file['extension']]) ?
|
||||
$config['file_icons'][$file['extension']] : $config['file_icons']['default']));
|
||||
$file['thumbwidth'] = $size[0];
|
||||
$file['thumbheight'] = $size[1];
|
||||
$file['thumbwidth'] = $size[0];
|
||||
$file['thumbheight'] = $size[1];
|
||||
$dont_copy_file = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1121,7 +1122,7 @@ if (isset($_POST['delete'])) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!isset($dont_copy_file) || !$dont_copy_file) {
|
||||
if (!$dont_copy_file) {
|
||||
if (isset($file['file_tmp'])) {
|
||||
if (!@rename($file['tmp_name'], $file['file_path']))
|
||||
error($config['error']['nomove']);
|
||||
|
|
Loading…
Reference in New Issue
Block a user