From 284a0b346f412a8039c558344ad89676f151698c Mon Sep 17 00:00:00 2001 From: Mohamed DAOUD Date: Thu, 14 Nov 2024 14:36:48 +0100 Subject: [PATCH] Update rapport.php --- htdocs/compta/paiement/rapport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index aed0a8a1ef794..85768cd02647d 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -72,7 +72,7 @@ * Actions */ -if ($action == 'builddoc' && !empty($permissiontoread)) { +if ($action == 'builddoc' && $permissiontoread != 0) { $rap = new pdf_paiement($db); $outputlangs = $langs; @@ -95,7 +95,7 @@ } // Delete file from disk -if ($action == 'removedoc' && !empty($permissiontoread) && $fileToRemove) { +if ($action == 'removedoc' && $permissiontoread != 0 && $fileToRemove) { $fullpathfile = dol_sanitizePathName($dir.'/'.$fileToRemove); $fileDirectory = dirname($fullpathfile); if (dol_delete_file($fullpathfile)) {