From f634116ec3d60302185d7d3a526bc43d55c24ce6 Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Sun, 13 Mar 2022 00:27:16 +0000 Subject: [PATCH] lp1913340 - List All Courses in OPAC - Removed handling preventing an empty query from providing results - Strip * from query to ensure expected behavior Signed-off-by: Kyle Huckins Signed-off-by: Christine Burns Signed-off-by: Jane Sandberg --- .../perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm index 260221f..7446ba6 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm @@ -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); } -- 1.7.2.5