From 8bce9dc5405bd02af130749fa8859f4fdc82707c Mon Sep 17 00:00:00 2001 From: Mohamed DAOUD Date: Wed, 13 Nov 2024 20:17:16 +0100 Subject: [PATCH] update --- htdocs/compta/paiement/rapport.php | 6 +++--- htdocs/fourn/facture/rapport.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index a45b2eded012a..2691f99d7bd3c 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -96,11 +96,11 @@ // Delete file from disk if ($action == 'removedoc' && $permissiontoread && $fileToRemove) { - $directory = dirname($dir.'/'.$fileToRemove); + $fileDirectory = dirname($dir.'/'.$fileToRemove); if (dol_delete_file($dir.'/'.$fileToRemove)) { // Delete empty directory after file deletion - if (empty(dol_dir_list($directory))) { - dol_delete_dir($directory); + if (empty(dol_dir_list($fileDirectory))) { + dol_delete_dir($fileDirectory); } setEventMessages($langs->trans("FileWasRemoved", $fileToRemove), null, 'mesgs'); } else { diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index 58471ab6b40db..7b442a9d28e35 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -98,11 +98,11 @@ // Delete file from disk if ($action == 'removedoc' && $permissiontoread && $fileToRemove) { - $directory = dirname($dir.'/'.$fileToRemove); + $fileDirectory = dirname($dir.'/'.$fileToRemove); if (dol_delete_file($dir.'/'.$fileToRemove)) { // Delete empty directory after file deletion - if (empty(dol_dir_list($directory))) { - dol_delete_dir($directory); + if (empty(dol_dir_list($fileDirectory))) { + dol_delete_dir($fileDirectory); } setEventMessages($langs->trans("FileWasRemoved", $fileToRemove), null, 'mesgs'); } else {