2
0
forked from Wavyzz/dolibarr

FIX : Add bookmark with search fields that are arrays (backport 4157263cb8)

This commit is contained in:
Gauthier PC portable 024
2023-03-27 12:24:33 +02:00
parent a07d40c530
commit 723cdcea19

View File

@@ -65,7 +65,13 @@ function printDropdownBookmarksList()
if ((preg_match('/^search_/', $key) || in_array($key, $authorized_var)) if ((preg_match('/^search_/', $key) || in_array($key, $authorized_var))
&& $val != '' && $val != ''
&& !array_key_exists($key, $url_param)) { && !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)));
}
} }
} }
} }