Merge pull request #24347 from atm-gauthier/fix_15.0_bookmarks_with_fields_array

FIX : Add bookmark with search fields that are arrays (backport 41572…
This commit is contained in:
Laurent Destailleur 2023-03-28 17:10:39 +02:00 committed by GitHub
commit cc305a868e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,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)));
}
}
}
}