Fix: [ bug #503 ] Unable to delete linked file to a deposit

Conflicts:
	htdocs/compta/paiement/cheque/fiche.php
This commit is contained in:
Regis Houssin 2012-08-18 09:01:17 +02:00
parent 2bd7dc68d3
commit 5f8530d0c0

View File

@ -216,6 +216,21 @@ if ($action == 'builddoc' && $user->rights->banque->cheque)
}
}
// Remove file in doc form
else if ($action == 'remove_file' && $user->rights->banque->cheque)
{
$remisecheque = new RemiseCheque($db);
if ($remisecheque->fetch($_GET["id"]) > 0)
{
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
$langs->load("other");
$file=$dir.get_exdir($remisecheque->number,2,1) . GETPOST('file');
$ret=dol_delete_file($file);
}
}
/*
* View