lp1913815 Course Browse Case-Sensitivity Edge Case Cont'd user/khuckins/lp1913815-course-browse-not-working
authorKyle Huckins <khuckins@catalyte.io>
Mon, 9 May 2022 18:23:54 +0000 (18:23 +0000)
committerKyle Huckins <khuckins@catalyte.io>
Mon, 9 May 2022 20:37:04 +0000 (20:37 +0000)
- Refactor Case Sensitivty check to fix issue requiring exact match

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Course.pm

index c27bc38..39da9d6 100644 (file)
@@ -183,7 +183,7 @@ sub load_course_browse {
             if ($value_exists eq 0) {
                 # For Name/Course Number browse queries...
                 if ($bterm_match eq 0) {
-                    if ($bterm =~ qr/$result->{$qtype}/i) {
+                    if ($result->{$rqtype} =~ m/^$bterm./i || $result->{$rqtype} eq  m/^$bterm./i) {
                         $bterm_match = 1;
                         $entry->{'match'} = 1;
                     }