Journal title hackery - move to a more robust location
authorDan Scott <dscott@laurentian.ca>
Fri, 7 Sep 2012 03:37:32 +0000 (23:37 -0400)
committerDan Wells <dbw2@calvin.edu>
Fri, 7 Sep 2012 13:43:11 +0000 (09: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>
Signed-off-by: Dan Wells <dbw2@calvin.edu>

Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm

index e66fee2..173e194 100644 (file)
@@ -47,11 +47,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;
     }
@@ -92,6 +87,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');