Journal title hackery - move to a more robust location user/dbs/tpac_fix_jtitle_regression
authorDan Scott <dscott@laurentian.ca>
Fri, 7 Sep 2012 03:37:32 +0000 (23:37 -0400)
committerDan Scott <dscott@laurentian.ca>
Fri, 7 Sep 2012 03:43:12 +0000 (23:43 -0400)
The fix for bug #1044721 broke the journal title hack, which probably
should have lived where this commit moves it - if, in the age of filter
groups, we decide whether it's worthwhile to keep it alive at all.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm

index c77eabb..3f66f53 100644 (file)
@@ -52,11 +52,6 @@ sub _prepare_biblio_search_basics {
         }
         $query = "$qtype:$query" unless $qtype eq 'keyword' and $i == 0;
 
-        # Hack for journal title - completed!
-        if ($q eq 'jtitle') {
-            $query = "bib_level:s $query";
-        }
-
         $bool = ($bool and $bool eq 'or') ? '||' : '&&';
         $full_query = $full_query ? "($full_query $bool $query)" : $query;
     }
@@ -97,6 +92,11 @@ sub _prepare_biblio_search {
         $query .= " container(bre,bookbag," . int($cgi->param("bookbag")) . ")";
     }
 
+    # Journal title hackery complete
+    if ($cgi->param("qtype") && $cgi->param("qtype") eq "jtitle") {
+        $query .= " bib_level(s)";
+    }
+
     if ($cgi->param('pubdate') && $cgi->param('date1')) {
         if ($cgi->param('pubdate') eq 'between') {
             $query .= ' between(' . $cgi->param('date1');