Bugzilla – Attachment 19746 Details for
Bug 10578
Escaping CGI breaks results sort feature (librarian's interface)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 10578 - Escaping CGI breaks results sort feature (librarian's interface)
SIGNED-OFF-Bug-10578---Escaping-CGI-breaks-results.patch (text/plain), 2.41 KB, created by
Srdjan Jankovic
on 2013-07-18 04:45:50 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 10578 - Escaping CGI breaks results sort feature (librarian's interface)
Filename:
MIME Type:
Creator:
Srdjan Jankovic
Created:
2013-07-18 04:45:50 UTC
Size:
2.41 KB
patch
obsolete
>From a5f4f290597788e4b1fb669f37d1957a3f1f2510 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Thu, 11 Jul 2013 19:07:09 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 10578 - Escaping CGI breaks results sort > feature (librarian's interface) > >To test (in librarian's interface): > >1. Have some biblio records to get a list when searching. >2. Make an advanced search with 'as phrase' modifier (title -- ti,phr: >or author -- au,phr: , etc.) >3. Having the result list try to change the sort order. >4. You should get no results with a message like: "No results match your >search for 'au%2Cphr: " etc. >5. Apply the patch >6. Repeat steps 2. & 3. >7. You should get the list sorted according to your choice. > >Signed-off-by: Srdjan <srdjan@catalyst.net.nz> >--- > catalogue/search.pl | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index f8dab56..e1154c3 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -148,6 +148,7 @@ use C4::Languages qw(getAllLanguages); > use C4::Koha; > use C4::Members qw(GetMember); > use C4::VirtualShelves; >+use URI::Escape; > use POSIX qw(ceil floor); > use C4::Branch; # GetBranches > >@@ -391,11 +392,11 @@ unless (@servers) { > } > # operators include boolean and proximity operators and are used > # to evaluate multiple operands >-my @operators = $cgi->param('op'); >+my @operators = map uri_unescape($_), $cgi->param('op'); > > # indexes are query qualifiers, like 'title', 'author', etc. They > # can be single or multiple parameters separated by comma: kw,right-Truncation >-my @indexes = $cgi->param('idx'); >+my @indexes = map uri_unescape($_), $cgi->param('idx'); > > # if a simple index (only one) display the index used in the top search box > if ($indexes[0] && (!$indexes[1] || $params->{'scan'})) { >@@ -404,12 +405,11 @@ if ($indexes[0] && (!$indexes[1] || $params->{'scan'})) { > $template->param($idx => 1); > } > >- > # an operand can be a single term, a phrase, or a complete ccl query >-my @operands = $cgi->param('q'); >+my @operands = map uri_unescape($_), $cgi->param('q'); > > # limits are use to limit to results to a pre-defined category such as branch or language >-my @limits = $cgi->param('limit'); >+my @limits = map uri_unescape($_), $cgi->param('limit'); > > if($params->{'multibranchlimit'}) { > my $multibranch = '('.join( " or ", map { "branch: $_ " } @{ GetBranchesInCategory( $params->{'multibranchlimit'} ) } ).')'; >-- >1.8.1.2
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 10578
:
19581
|
19746
|
19834