[Koha-patches] [PATCH] [Signed Off] Bug 5305: CCL query, then resort, loses reults.

Liz Rea lrea at nekls.org
Wed Mar 30 18:11:51 CEST 2011


From: ruth at bywatersolutions.com <ruth at bywatersolutions.com>

If you did a CCL query, then attempted resort, you would get the advanced-search page,
because of wonky URL escaping of the q= clause.  This patch fixes that.

Signed-off-by: Liz Rea <lrea at nekls.org>
---
 catalogue/search.pl |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/catalogue/search.pl b/catalogue/search.pl
index b1a0b4f..17cbdcc 100755
--- a/catalogue/search.pl
+++ b/catalogue/search.pl
@@ -468,10 +468,9 @@ my $scan_index_to_use;
 
 for my $this_cgi ( split('&',$query_cgi) ) {
     next unless $this_cgi;
-    $this_cgi =~ m/(.*=)(.*)/;
+    $this_cgi =~ m/(.?)=(.*)/;
     my $input_name = $1;
     my $input_value = $2;
-    $input_name =~ s/=$//;
     push @query_inputs, { input_name => $input_name, input_value => $input_value };
 	if ($input_name eq 'idx') {
     	$scan_index_to_use = $input_value; # unless $scan_index_to_use;
-- 
1.5.6.5



More information about the Koha-patches mailing list