mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-13 15:58:42 +00:00
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
This commit is contained in:
parent
430863cdd0
commit
8d90bb1f55
|
|
@ -231,7 +231,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
$mediaCreated = [];
|
$mediaCreated = [];
|
||||||
|
|
||||||
if (!empty($files)) {
|
if (!empty($files)) {
|
||||||
$upload = new UploadFile();
|
$upload = new UploadFile();
|
||||||
$upload->setOutputDir(self::createMediaPath($basePath));
|
$upload->setOutputDir(self::createMediaPath($basePath));
|
||||||
|
|
||||||
$status = $upload->upload($files);
|
$status = $upload->upload($files);
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ class UploadFile
|
||||||
} elseif ($extension === 'jpg' || $extension === 'jpeg') {
|
} elseif ($extension === 'jpg' || $extension === 'jpeg') {
|
||||||
$img = imagecreatefromjpeg($path);
|
$img = imagecreatefromjpeg($path);
|
||||||
} else {
|
} else {
|
||||||
$img = imagecreatefromgif ($path);
|
$img = imagecreatefromgif($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
imageinterlace($img, (int) $this->interlaced);
|
imageinterlace($img, (int) $this->interlaced);
|
||||||
|
|
@ -212,7 +212,7 @@ class UploadFile
|
||||||
} elseif ($extension === 'jpg' || $extension === 'jpeg') {
|
} elseif ($extension === 'jpg' || $extension === 'jpeg') {
|
||||||
imagejpeg($img, $path);
|
imagejpeg($img, $path);
|
||||||
} else {
|
} else {
|
||||||
imagegif ($img, $path);
|
imagegif($img, $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
imagedestroy($img);
|
imagedestroy($img);
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Loading…
Reference in New Issue
Block a user