FIX Add bookmark with search fields that are arrays

This commit is contained in:
Laurent Destailleur 2023-01-19 13:40:37 +01:00
parent 36fd6e6870
commit 4157263cb8

View File

@ -52,6 +52,7 @@ function printDropdownBookmarksList()
}
}
}
$tmpurl = '';
// No urlencode, all param $url will be urlencoded later
if ($sortfield) {
@ -65,7 +66,13 @@ function printDropdownBookmarksList()
if ((preg_match('/^search_/', $key) || in_array($key, $authorized_var))
&& $val != ''
&& !array_key_exists($key, $url_param)) {
$url_param[$key] = http_build_query(array(dol_escape_htmltag($key) => dol_escape_htmltag($val)));
if (is_array($val)) {
foreach ($val as $tmpsubval) {
$url_param[] = http_build_query(array(dol_escape_htmltag($key).'[]' => dol_escape_htmltag($tmpsubval)));
}
} elseif ($val != '') {
$url_param[$key] = http_build_query(array(dol_escape_htmltag($key) => dol_escape_htmltag($val)));
}
}
}
}