From 84c62227a52da3388f3b16baea8433b2f91828cc Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 15 Dec 2016 13:45:22 +0100 Subject: [PATCH] Bug 16951: Fix Item search sorting Caused by commit ac5a1bfececb5400a77f0ebad90181f5215d5a85 Bug 16154: CGI->multi_param - Manual changes The change was wrong, we wanted to retrieve a scalar (the string), not an array. We want to retrieve a string with the different column' names, not an array of 1 element. Test plan: Launch an item search and play with column sort Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall (cherry picked from commit 2184fa6ab1a7449857df15894c8de075aac729ec) Signed-off-by: Katrin Fischer (cherry picked from commit 01f495673f61eb5fced39f1f47ea2c04b5074a35) Signed-off-by: Julian Maurice --- catalogue/itemsearch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl index cb1a04ad16..5353d19ea3 100755 --- a/catalogue/itemsearch.pl +++ b/catalogue/itemsearch.pl @@ -43,7 +43,7 @@ if (defined $format and $format eq 'json') { # Map DataTables parameters with 'regular' parameters $cgi->param('rows', $cgi->param('iDisplayLength')); $cgi->param('page', ($cgi->param('iDisplayStart') / $cgi->param('iDisplayLength')) + 1); - my @columns = split /,/, $cgi->multi_param('sColumns'); + my @columns = split /,/, scalar $cgi->param('sColumns'); $cgi->param('sortby', $columns[ $cgi->param('iSortCol_0') ]); $cgi->param('sortorder', $cgi->param('sSortDir_0')); -- 2.39.5