From 78103475da805ca9e59d7c94e531fdcc7b43260e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 27 Mar 2013 16:26:28 -0400 Subject: [PATCH] LP 1160522 2.3 tpac search modifier query append Append search modifiers (e.g. limit to available) to the end of the tpac search query to avoid SQL generation issues with 2.3 series query parser. Signed-off-by: Bill Erickson Signed-off-by: Ben Shum --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm index c85a0bba24..470426cc87 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm @@ -61,10 +61,6 @@ sub _prepare_biblio_search { $query .= ' ' . $ctx->{global_search_filter} if $ctx->{global_search_filter}; - foreach ($cgi->param('modifier')) { - # The unless bit is to avoid stacking modifiers. - $query = ('#' . $_ . ' ' . $query) unless $query =~ qr/\#\Q$_/; - } # filters foreach (grep /^fi:/, $cgi->param) { @@ -168,6 +164,11 @@ sub _prepare_biblio_search { push @naive_query_re, $thing; } + foreach ($cgi->param('modifier')) { + # The unless bit is to avoid stacking modifiers. + $query .= " #$_" unless $query =~ qr/\#\Q$_/; + } + # This gives templates a way to take site() and depth() back out of # query strings when they shouldn't be there (because they're controllable # with other widgets). -- 2.11.0