From d563deee67cb9d0eb07c782c5ebad35e076244e9 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Mon, 4 Mar 2013 12:55:12 -0500 Subject: [PATCH] Bug 9239 QA follow-up: fix highlighting and merge error QP searches with && broke search highlighting on the OPAC details page. This patch corrects encoding of the query_desc parameter that is passed to the details page. My last attempt at rebasing also transposed the variable for index names with the variable for operators, meaning that the dropdown in the basic search did not work. Signed-off-by: Chris Cormack --- C4/Search.pm | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt | 2 +- koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index cdddbaa..9e8437b 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1188,7 +1188,7 @@ sub parseQuery { $query .= $operators[ $ii - 1 ] eq 'or' ? ' || ' : ' && ' if ($query); $query .= - ( $operators[$ii] ? "$operators[$ii]:" : '' ) . $operands[$ii]; + ( $indexes[$ii] ? "$indexes[$ii]:" : '' ) . $operands[$ii]; } foreach my $limit (@limits) { } diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt index a461800..70aae62 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt @@ -17,7 +17,7 @@ var q_array = new Array(); // will hold the search terms, if possible $(document).ready(function(){ [% IF ( OpacHighlightedWords ) %] $('a.title').each(function() { - $(this).attr('href', $(this).attr('href') + '&query_desc=[% query_desc | url %]'); + $(this).attr('href', $(this).attr('href') + '&query_desc=[% query_desc | uri %]'); }); [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt index 30682c4..04d02ba 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt @@ -105,7 +105,7 @@ function highlightOn() { $(document).ready(function(){ [% IF ( OpacHighlightedWords ) %] $('a.title').each(function() { - $(this).attr('href', $(this).attr('href') + '&query_desc=[% query_desc | url %]'); + $(this).attr('href', $(this).attr('href') + '&query_desc=[% query_desc | uri %]'); }); [% END %] -- 1.7.10.4