diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 5697e93407d..69dfffba3a7 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -3176,7 +3176,7 @@ if (!function_exists("llxFooter")) { // Clean and save data foreach ($user->lastsearch_values_tmp as $key => $val) { unset($_SESSION['lastsearch_values_tmp_'.$key]); // Clean array to rebuild it just after - if (count($val) && empty($_POST['button_removefilter'])) { // If there is search criteria to save and we did not click on 'Clear filter' button + if (count($val) && empty($_POST['button_removefilter']) && empty($_POST['button_removefilter_x'])) { if (empty($val['sortfield'])) { unset($val['sortfield']); }