lp1913340 - List All Courses in OPAC
authorKyle Huckins <khuckins@catalyte.io>
Sun, 13 Mar 2022 00:27:16 +0000 (00:27 +0000)
committerJane Sandberg <js7389@princeton.edu>
Thu, 7 Apr 2022 04:05:03 +0000 (21:05 -0700)
- Removed handling preventing an empty query from providing results
- Strip * from query to ensure expected behavior

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Signed-off-by: Christine Burns <christine.burns@bc.libraries.coop>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>

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

index 260221f..7446ba6 100644 (file)
@@ -233,7 +233,7 @@ sub load_cresults {
 
     my ($user_query, $query, @queries, $modifiers) = _prepare_course_search($cgi, $ctx);
 
-    return Apache2::Const::OK unless $query;
+    #return Apache2::Const::OK unless $query;
 
     $ctx->{user_query} = $user_query;
     $ctx->{processed_search_query} = $query;
@@ -253,6 +253,7 @@ sub load_cresults {
     for my $query_obj (@queries) {
         my $type = $query_obj->{'qtype'};
         my $query = $query_obj->{'value'};
+        $query =~ s/\*//g;
         my $bool = $query_obj->{'bool'};
         my $contains = $query_obj->{'contains'};
         my $operator = ($contains eq 'nocontains') ? '!~*' : '~*';
@@ -356,7 +357,7 @@ sub _prepare_course_search {
         $query .= " $1($term)" if length $term;
     }
 
-    return () unless $query;
+    #return () unless $query;
 
     return ($user_query, $query, @queries);
 }