Bugzilla – Attachment 58243 Details for
Bug 16951
Item search sorting not working properly for most columns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16951: Fix Item search sorting
Bug-16951-Fix-Item-search-sorting.patch (text/plain), 1.30 KB, created by
Jonathan Druart
on 2016-12-16 10:43:14 UTC
(
hide
)
Description:
Bug 16951: Fix Item search sorting
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-12-16 10:43:14 UTC
Size:
1.30 KB
patch
obsolete
>From 2d9993011b4fbbe5c21a7d4245cd3a43d20c3551 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 >--- > catalogue/itemsearch.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl >index a2f0e41..49e56ee 100755 >--- a/catalogue/itemsearch.pl >+++ b/catalogue/itemsearch.pl >@@ -44,7 +44,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.9.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16951
:
58243
|
58244
|
58381
|
58382
|
58384
|
58385