From d8ca12b404da1833ed7c8ae51ab69af6086705a6 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 (cherry picked from commit 492d7be2ccba07f47771184fd5cc903383abb63b) Signed-off-by: Fridolin Somers --- 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 3463282c24..3bdbb520a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -480,7 +480,10 @@ type: 'POST', 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 );