Fix: missing remove_file action

Fix: use object instead id and store odt filename in object for use in
triggers
This commit is contained in:
Regis Houssin
2012-06-10 17:04:12 +02:00
parent eef50058b1
commit c9be1cbb8b
6 changed files with 71 additions and 22 deletions

View File

@@ -1023,11 +1023,13 @@ else if ($action == 'remove_file')
if ($object->fetch($id))
{
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
$object->fetch_thirdparty();
$langs->load("other");
$upload_dir = $conf->commande->dir_output;
$file = $upload_dir . '/' . GETPOST('file');
dol_delete_file($file);
dol_delete_file($file,0,0,0,$object);
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
}
}