mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix: big problem with files upload and more compatible with external
modules
This commit is contained in:
@@ -2302,7 +2302,7 @@ class Commande extends CommonObject
|
||||
{
|
||||
dol_delete_preview($this);
|
||||
|
||||
if (!dol_delete_file($file))
|
||||
if (! dol_delete_file($file,0,0,0,$this)) // For triggers
|
||||
{
|
||||
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
|
||||
$this->db->rollback();
|
||||
@@ -2311,7 +2311,7 @@ class Commande extends CommonObject
|
||||
}
|
||||
if (file_exists($dir))
|
||||
{
|
||||
if (!dol_delete_dir($dir))
|
||||
if (! dol_delete_dir($dir))
|
||||
{
|
||||
$this->error=$langs->trans("ErrorCanNotDeleteDir",$dir);
|
||||
$this->db->rollback();
|
||||
|
||||
Reference in New Issue
Block a user