From b93ab79679615d655145e06d24696980476289f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Sep 2018 00:39:28 +0200 Subject: [PATCH] FIX Error messages --- htdocs/compta/facture/class/facture.class.php | 6 ++++-- htdocs/fichinter/class/fichinter.class.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 0773e6eedc1..3ab5d84bfdb 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1982,7 +1982,8 @@ class Facture extends CommonInvoice if (! dol_delete_file($file,0,0,0,$this)) // For triggers { - $this->error=$langs->trans("ErrorCanNotDeleteFile",$file); + $langs->load("errors"); + $this->error=$langs->trans("ErrorFailToDeleteFile",$file); $this->db->rollback(); return 0; } @@ -1991,7 +1992,8 @@ class Facture extends CommonInvoice { if (! dol_delete_dir_recursive($dir)) // For remove dir and meta { - $this->error=$langs->trans("ErrorCanNotDeleteDir",$dir); + $langs->load("errors"); + $this->error=$langs->trans("ErrorFailToDeleteDir",$dir); $this->db->rollback(); return 0; } diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 4c66b192c95..48cbdbf7715 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -967,7 +967,8 @@ class Fichinter extends CommonObject if (! dol_delete_file($file,0,0,0,$this)) // For triggers { - $this->error=$langs->trans("ErrorCanNotDeleteFile",$file); + $langs->load("errors"); + $this->error=$langs->trans("ErrorFailToDeleteFile",$file); return 0; } } @@ -975,7 +976,8 @@ class Fichinter extends CommonObject { if (! dol_delete_dir_recursive($dir)) { - $this->error=$langs->trans("ErrorCanNotDeleteDir",$dir); + $langs->load("errors"); + $this->error=$langs->trans("ErrorFailToDeleteDir",$dir); return 0; } }