From c378a9a3d70f9fcd707a6f26f275445693d28a75 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 --- 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 975b96a70ba..7caba9a0c37 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 2b064b157f7..a840f7f1f3f 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 @@ 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.34.1