forked from ZwiiCMS-Team/ZwiiCMS
Gallery : upload par ftp, dossier miniature non créé.
This commit is contained in:
parent
72d5f46353
commit
6eb697e427
@ -794,8 +794,12 @@ class common {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function makeThumb($src, $dest, $desired_width) {
|
function makeThumb($src, $dest, $desired_width) {
|
||||||
|
// Vérifier l'existence du dossier de destination.
|
||||||
|
$path = pathinfo($dest);
|
||||||
|
if (!is_dir($path['dirname'])) {
|
||||||
|
mkdir($path['dirname']);
|
||||||
|
}
|
||||||
|
// Image jpeg
|
||||||
if (mime_content_type($src) === 'image/jpeg' ) {
|
if (mime_content_type($src) === 'image/jpeg' ) {
|
||||||
if ($source_image = imagecreatefromjpeg($src)) {
|
if ($source_image = imagecreatefromjpeg($src)) {
|
||||||
$width = imagesx($source_image);
|
$width = imagesx($source_image);
|
||||||
@ -811,6 +815,7 @@ class common {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// image png
|
||||||
if ( mime_content_type($src) === 'image/png' ) {
|
if ( mime_content_type($src) === 'image/png' ) {
|
||||||
/* read the source image */
|
/* read the source image */
|
||||||
if ($source_image = imagecreatefrompng($src)) {;
|
if ($source_image = imagecreatefrompng($src)) {;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user