From 0bff4ed1efbcd6dedd8398b5080ec0dec2b2cf7c Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Mon, 9 Sep 2019 16:11:44 -0700 Subject: [PATCH] LP#1839684: avoid repeating qtype prefix in query Signed-off-by: Jeff Davis Signed-off-by: Mike Rylander Signed-off-by: Gina Monti --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c21566a628..459e3089b6 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm @@ -67,7 +67,7 @@ sub _prepare_biblio_search_basics { $query = "bib_level(s) $query"; } - $query = "$qtype:$query" unless $qtype eq 'keyword' and $i == 0; + $query = "$qtype:$query" unless ($query =~ /^$qtype:/ or ($qtype eq 'keyword' and $i == 0)); $bool = ($bool and $bool eq 'or') ? '||' : '&&'; $full_query = $full_query ? "($full_query $bool $query)" : $query; -- 2.11.0