diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index bf0c691084f..60db23814b3 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -198,7 +198,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 2d4d138f61a..0844facca69 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 78f6da1702d..37f38b732fe 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 7eedec6f824..dba4f98bc82 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -819,7 +819,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 81e7fe9ac54..23dde2290b4 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 617039f25da..bd2d0591400 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 761d5d591e3..5b1148cd885 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 b0de98ae2eb..e67d6865090 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 ddfa1733f8c..5ff65eae816 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -407,7 +407,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 479366ab586..e115c51d635 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 f66a09c1efb..217a5367ecf 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -764,7 +764,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 2df78d44589..b6c3c2b1f10 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -995,7 +995,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 e6ced69ea64..41100c31a11 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