forked from Wavyzz/dolibarr
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:
@@ -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>';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user