@@ -, +, @@ http://localhost:8081/cgi-bin/koha/catalogue/itemsearch.pl from Centerville. from Centervile. --- catalogue/itemsearch.pl | 8 +++++++- .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 7 ++++--- 2 files changed, 11 insertions(+), 4 deletions(-) --- a/catalogue/itemsearch.pl +++ a/catalogue/itemsearch.pl @@ -130,7 +130,13 @@ 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 . "[]") ) { + + my @q; + @q = $cgi->multi_param( $p . "[]" ); + if ( scalar @q == 0 ) { + @q = $cgi->multi_param($p); + } + if (@q) { if ( $q[0] ne '' ) { my $f = { field => $p, --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -479,10 +479,11 @@ url: '/cgi-bin/koha/catalogue/itemsearch.pl', data: function ( d ) { for (i in params) { - if (! d.hasOwnProperty(params[i].name) ) { - d[params[i].name] = []; + if(d[params[i].name]){ + d[params[i].name] = [].concat(d[params[i].name], params[i].value); + }else{ + d[params[i].name] = params[i].value; } - d[params[i].name].push(params[i].value); } d.format = 'json'; d.columns = JSON.stringify( d.columns ); --