Fix for upload files
This commit is contained in:
parent
f6b602b6d7
commit
8a01557866
|
@ -672,8 +672,8 @@ class upfClass
|
|||
return false;
|
||||
}
|
||||
|
||||
$w = empty($width) || $width < 16 ? 1 : $width / $oldWidth;
|
||||
$h = empty($height) || $height < 16 ? 1 : $height / $oldHeight;
|
||||
$w = $width < 16 ? 1 : $width / $oldWidth;
|
||||
$h = ! is_numeric($height) || $height < 16 ? 1 : $height / $oldHeight;
|
||||
$r = min(1, $w, $h);
|
||||
if (1 == $r) { // ?
|
||||
return 1;
|
||||
|
|
|
@ -13,7 +13,7 @@ if (! defined('PUN')) {
|
|||
|
||||
// Tell admin_loader.php that this is indeed a plugin and that it is loaded
|
||||
define('PUN_PLUGIN_LOADED', 1);
|
||||
define('PLUGIN_VERSION', '3.3.0');
|
||||
define('PLUGIN_VERSION', '3.3.1');
|
||||
define('PLUGIN_URL', pun_htmlspecialchars('admin_loader.php?plugin=' . $plugin));
|
||||
define('PLUGIN_EXTS', 'webp,jpg,jpeg,png,gif,mp3,zip,rar,7z');
|
||||
define('PLUGIN_NF', 25);
|
||||
|
@ -620,7 +620,7 @@ if (empty($files)) {
|
|||
&& false !== $upf_class->loadImage()
|
||||
) {
|
||||
$upf_class->setImageQuality($aconf['thumb_perc']);
|
||||
$scaleResize = $upf_class->resizeImage(null, $aconf['thumb_size']);
|
||||
$scaleResize = $upf_class->resizeImage(0, $aconf['thumb_size']);
|
||||
|
||||
if (false !== $scaleResize) {
|
||||
if ($scaleResize < 1) {
|
||||
|
|
|
@ -417,7 +417,7 @@ elseif (
|
|||
if (true === $upf_class->isImage() && 1 == $upf_conf['thumb'] && $upf_class->isResize()) {
|
||||
$upf_class->setImageQuality($upf_conf['thumb_perc']);
|
||||
|
||||
$scaleResize = $upf_class->resizeImage(null, $upf_conf['thumb_size']);
|
||||
$scaleResize = $upf_class->resizeImage(0, $upf_conf['thumb_size']);
|
||||
if (false !== $scaleResize) {
|
||||
$path = PUN_ROOT . $upf_dir . 'mini_' . $fileinfo['filename'] . '.' . $fileinfo['extension'];
|
||||
|
||||
|
|
Loading…
Reference in New Issue