Fix: big problem with files upload and more compatible with external

modules

Conflicts:
	htdocs/compta/facture.php
This commit is contained in:
Regis Houssin
2012-05-30 00:09:38 +02:00
parent f11430dec8
commit 5c2922a17b
12 changed files with 103 additions and 39 deletions

View File

@@ -2304,7 +2304,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();
@@ -2313,7 +2313,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();