diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 02c1b0e65bb..9194ec62c49 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -201,7 +201,7 @@ if (empty($reshook)) { $result = $object->delete($user); if ($result > 0) { - header('Location: ' . DOL_URL_ROOT . '/comm/propal/list.php'); + header('Location: ' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1'); exit(); } else { $langs->load("errors"); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 2cb899fcfe6..26166ab3f75 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -185,7 +185,7 @@ if (empty($reshook)) $result = $object->delete($user); if ($result > 0) { - header('Location: index.php'); + header('Location: list.php?restore_lastsearch_values=1'); exit; } else diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 969f4d532cb..a08b6663c38 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -191,7 +191,7 @@ if (empty($reshook)) $result = $object->delete($user, 0, $idwarehouse); if ($result > 0) { - header('Location: ' . DOL_URL_ROOT . '/compta/facture/list.php'); + header('Location: ' . DOL_URL_ROOT . '/compta/facture/list.php?restore_lastsearch_values=1'); exit(); } else { setEventMessages($object->error, $object->errors, 'errors'); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 3b7ab5ae49b..c92246cf82a 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -842,7 +842,7 @@ if (empty($reshook)) $result=$object->delete($user); if ($result >= 0) { - header("Location: index.php"); + header("Location: list.php?restore_lastsearch_values=1"); return; } else diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 9b623d21279..b2533ba553c 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -470,7 +470,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } - header('Location: '.DOL_URL_ROOT.'/fichinter/list.php?leftmenu=ficheinter'); + header('Location: '.DOL_URL_ROOT.'/fichinter/list.php?leftmenu=ficheinter&restore_lastsearch_values=1'); exit; } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index f87b4c9bd25..6f541803d55 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -850,7 +850,7 @@ if (empty($reshook)) $result=$object->delete($user); if ($result > 0) { - header("Location: ".DOL_URL_ROOT.'/fourn/commande/list.php'); + header("Location: ".DOL_URL_ROOT.'/fourn/commande/list.php?restore_lastsearch_values=1'); exit; } else diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index cc6fb29fa5a..0368d5cd7c8 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -224,7 +224,7 @@ if (empty($reshook)) $result=$object->delete($user); if ($result > 0) { - header('Location: list.php'); + header('Location: list.php?restore_lastsearch_values=1'); exit; } else diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index ce985b51738..59cb522d7d5 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -299,7 +299,7 @@ if ($action == 'confirm_delete' && GETPOST('confirm') == 'yes' && $user->rights- if (! $error) { $db->commit(); - header('Location: list.php'); + header('Location: list.php?restore_lastsearch_values=1'); exit; } else diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index 06c602df330..0e61adcb279 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -165,7 +165,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expeditio { $db->commit(); if (! empty($backtopage)) header("Location: ".$backtopage); - else header("Location: ".DOL_URL_ROOT.'/expedition/index.php'); + else header("Location: ".DOL_URL_ROOT.'/expedition/list.php?restore_lastsearch_values=1'); exit; } else diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 8ab36de3428..61bd5c3d47f 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -117,7 +117,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->stock->su if ($result > 0) { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); - header("Location: ".DOL_URL_ROOT.'/product/stock/list.php'); + header("Location: ".DOL_URL_ROOT.'/product/stock/list.php?resotre_lastsearch_values=1'); exit; } else diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 7494a5a15bb..c5cfb9b3756 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -409,7 +409,7 @@ if (empty($reshook)) if ($result > 0) { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); - header("Location: index.php"); + header("Location: list.php?restore_lastsearch_values=1"); exit; } else diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 3d1ccfb8fe1..85a6461fbfb 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -125,7 +125,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->s if ($object->delete($user) > 0) { - header('Location: '.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'')); + header('Location: '.DOL_URL_ROOT.'/projet/tasks.php?restore_lastsearch_values=1&id='.$projectstatic->id.($withproject?'&withproject=1':'')); exit; } else diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 37f60150dd8..dfe6f07cd53 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -796,7 +796,7 @@ if (empty($reshook)) if ($result > 0) { - header("Location: ".DOL_URL_ROOT."/societe/list.php?delsoc=".urlencode($object->name)); + header("Location: ".DOL_URL_ROOT."/societe/list.php?restore_lastsearch_values=1&delsoc=".urlencode($object->name)); exit; } else diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 47852c71403..9861f4b8d66 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -998,7 +998,7 @@ while ($i < min($num, $limit)) $savalias = $obj->name_alias; if (! empty($arrayfields['s.name_alias']['checked'])) $companystatic->name_alias=''; print ''; - print $companystatic->getNomUrl(1,'',100); + print $companystatic->getNomUrl(1, '', 100, 0, 1); print "\n"; $companystatic->name_alias = $savalias; if (! $i) $totalarray['nbfield']++; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 9e7c90f79ac..a11c18daca7 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -157,7 +157,7 @@ if (empty($reshook)) { $langs->load("errors"); setEventMessages($langs->trans("ErrorUserCannotBeDelete"), null, 'errors'); } else { - header("Location: index.php"); + header("Location: index.php?restore_lastsearch_values=1"); exit; } } diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 8f99fa1bb81..52de09d566d 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -91,7 +91,7 @@ if (empty($reshook)) { { $object->fetch($id); $object->delete(); - header("Location: index.php"); + header("Location: index.php?restore_lastsearch_values=1"); exit; } else