Fix clear of search criteria on clear all button

This commit is contained in:
Laurent Destailleur 2022-07-07 17:15:50 +02:00
parent 9036ab94ab
commit ba82c86bd5

View File

@ -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']);
}