Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daoud-mohamed committed Nov 13, 2024
1 parent de4e4d4 commit 8bce9dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions htdocs/compta/paiement/rapport.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@

// Delete file from disk
if ($action == 'removedoc' && $permissiontoread && $fileToRemove) {

Check failure on line 98 in htdocs/compta/paiement/rapport.php

View workflow job for this annotation

GitHub Actions / phpstan

Right side of && is always true.

Check failure on line 98 in htdocs/compta/paiement/rapport.php

View workflow job for this annotation

GitHub Actions / phpstan / php-stan (8.2)

Right side of && is always true.
$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 {
Expand Down
6 changes: 3 additions & 3 deletions htdocs/fourn/facture/rapport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8bce9dc

Please sign in to comment.