From 492d7be2ccba07f47771184fd5cc903383abb63b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 10 Apr 2024 12:04:18 +0200 Subject: [PATCH] Bug 36563: Dirty fix Signed-off-by: Lucas Gass Signed-off-by: Pedro Amorim Signed-off-by: Katrin Fischer --- catalogue/itemsearch.pl | 2 +- .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl index 975b96a70b..7caba9a0c3 100755 --- a/catalogue/itemsearch.pl +++ b/catalogue/itemsearch.pl @@ -130,7 +130,7 @@ if ( defined $format ) { foreach my $p ( qw(homebranch holdingbranch location itype ccode issues datelastborrowed notforloan itemlost withdrawn damaged)) { - if ( my @q = $cgi->multi_param($p) ) { + if ( my @q = $cgi->multi_param($p . "[]") ) { if ( $q[0] ne '' ) { my $f = { field => $p, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index be573fb7e1..611da3a069 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -479,7 +479,10 @@ url: '/cgi-bin/koha/catalogue/itemsearch.pl', data: function ( d ) { for (i in params) { - d[params[i].name] = params[i].value; + if (! d.hasOwnProperty(params[i].name) ) { + d[params[i].name] = []; + } + d[params[i].name].push(params[i].value); } d.format = 'json'; d.columns = JSON.stringify( d.columns ); -- 2.39.5