Fix: delete of documents is done by page of element, not by the view

wrapper.
This commit is contained in:
Laurent Destailleur
2012-05-29 23:50:13 +02:00
parent 446ae46557
commit 3fc3292142
27 changed files with 340 additions and 217 deletions

View File

@@ -476,11 +476,11 @@ else if ($action == 'setconditions' && $user->rights->commande->creer)
$object->fetch($id);
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
if ($result < 0)
{
{
dol_print_error($db,$object->error);
}
else
{
{
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{
// Define output language
@@ -496,7 +496,7 @@ else if ($action == 'setconditions' && $user->rights->commande->creer)
$ret=$object->fetch($id); // Reload to get new records
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager);
}
}
}
}
else if ($action == 'setremisepercent' && $user->rights->commande->creer)
@@ -1028,10 +1028,11 @@ else if ($action == 'remove_file')
{
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
$langs->load("other");
$upload_dir = $conf->commande->dir_output;
$file = $upload_dir . '/' . $_GET['file'];
$file = $upload_dir . '/' . GETPOST('file');
dol_delete_file($file);
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
}
}