In some cases of improper use of the delete () function, the complete repertoire of propale objects, invoice or order was deleted.

Ex in agefodd module:
	$obj_link=new Propal($db);
        $obj_link->id=$agf->propalid;
        $resultdel=$obj_link->delete($user);

To prevent misuse of the function, the reference is not considered given
This commit is contained in:
Alexis Algoud
2013-12-11 15:14:29 +01:00
parent c49aabe574
commit 895f5452b4
3 changed files with 3 additions and 3 deletions

View File

@@ -2457,7 +2457,7 @@ class Commande extends CommonOrder
// On efface le repertoire de pdf provisoire
$comref = dol_sanitizeFileName($this->ref);
if ($conf->commande->dir_output)
if ($conf->commande->dir_output && !empty($this->ref))
{
$dir = $conf->commande->dir_output . "/" . $comref ;
$file = $conf->commande->dir_output . "/" . $comref . "/" . $comref . ".pdf";