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 );