From: Bill Erickson Date: Wed, 27 Mar 2013 20:26:28 +0000 (-0400) Subject: LP 1160522 2.3 tpac search modifier query append X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=97c70bbcd6011e8b189d93769cccf96b0dcce0a8;p=working%2FEvergreen.git 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 --- 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).