Qual: Mutualize code to delete previews

This commit is contained in:
Laurent Destailleur
2011-11-04 00:27:30 +01:00
parent d872f4d389
commit c16c09a451
14 changed files with 101 additions and 412 deletions

View File

@@ -2342,7 +2342,7 @@ class Commande extends CommonObject
$file = $conf->commande->dir_output . "/" . $comref . "/" . $comref . ".pdf";
if (file_exists($file)) // We must delete all files before deleting directory
{
dol_delete_preview($object);
dol_delete_preview($this);
if (!dol_delete_file($file))
{