oopsi j'ai pas bien merge
This commit is contained in:
parent
d5f740687d
commit
1b6ed09158
6 changed files with 7 additions and 5 deletions
|
|
@ -175,7 +175,7 @@
|
|||
|
||||
// Redimensionnement de l'image
|
||||
if (isset($strImageName)){
|
||||
$strDest = $_ENV['IMG_PATH'].$strImageName;
|
||||
$strDest = $_ENV['IMG_PROJECT_PATH'].$strImageName;
|
||||
$strSource = $_FILES['thumbnail']['tmp_name'];
|
||||
list($intWidth, $intHeight) = getimagesize($strSource);
|
||||
|
||||
|
|
@ -213,6 +213,7 @@
|
|||
|
||||
// Sauvegarde du fichier
|
||||
$boolImageOk = imagewebp($objDest, $strDest);
|
||||
|
||||
imagedestroy($objDest);
|
||||
imagedestroy($objSource);
|
||||
}
|
||||
|
|
@ -229,7 +230,7 @@
|
|||
if ($boolOk){
|
||||
// Suppression de l'ancienne image
|
||||
if(isset($strOldImg) && !empty($strOldImg) && isset($strImageName)){
|
||||
$strOldFile = $_ENV['IMG_PATH'].$strOldImg;
|
||||
$strOldFile = $_ENV['IMG_PROJECT_PATH'].$strOldImg;
|
||||
if (file_exists($strOldFile)) unlink($strOldFile);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue