From: Kyle Huckins Date: Thu, 21 Apr 2022 20:54:08 +0000 (+0000) Subject: lp1913815 Case-insensitive edge-case X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1cf5402618390a216f8f5910bca6fc9780ea03c7;p=working%2FEvergreen.git lp1913815 Case-insensitive edge-case - Ensure match found correctly when search term matches exactly except for case Signed-off-by: Kyle Huckins Changes to be committed: modified: Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm --- 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 22cf1f0467..dc6049e759 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm @@ -54,6 +54,11 @@ sub load_course_browse { my $bterm = $cgi->param('bterm'); my $qtype = $cgi->param('qtype'); my $locg = $cgi->param('locg'); + my $pivot = scalar($self->cgi->param('bpivot')); + my $limit = int( + $self->cgi->param('blimit') || + $self->ctx->{opac_hits_per_page} || 10 + ); # Search term is optional. If it's empty, start at the # beginning. Otherwise, center results on a match. # Regardless, we're listing everything, so retrieve all. @@ -178,7 +183,7 @@ sub load_course_browse { if ($value_exists eq 0) { # For Name/Course Number browse queries... if ($bterm_match eq 0) { - if ($result->{$qtype} =~ m/^$bterm./i || $result->{$qtype} eq $bterm) { + if ($bterm =~ qr/$result->{$qtype}/i) { $bterm_match = 1; $entry->{'match'} = 1; }