From d830041441272e74373d7e21d014445340c1a6a9 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 6 Aug 2012 17:37:40 +0200 Subject: [PATCH] Fix: missing object --- htdocs/product/document.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 47f985bff2f..7c85be67781 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -82,7 +82,7 @@ if ($action=='delete') { $langs->load("other"); $file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). - $ret=dol_delete_file($file); + $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);