From c8762d250810652cafb3a1e3cb2f42a3da3caab6 Mon Sep 17 00:00:00 2001 From: Joseph Sikowitz Date: Sat, 18 Apr 2020 16:06:05 -0400 Subject: [PATCH] Bug 24750: Instructor Search Results Adds regex to the split() of the passed parameters to improve searching. Test plan 1. Go to Course Reserves module. 2. Press New course button. 3. Make active the instructor search box. 4. Start typing the last name of a patron that exists in your database. 5. At the end of the last name type ", " and try to add a first name. 6. The search should fail. 7. Apply the patch. 8. Follow steps 1-5 again. 9. You should now be able to search using the following methods 9a. surname, firstname 9b. firstname surname --- circ/ysearch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circ/ysearch.pl b/circ/ysearch.pl index b9e75d0..5db55ff 100755 --- a/circ/ysearch.pl +++ b/circ/ysearch.pl @@ -52,7 +52,7 @@ if ( C4::Context->preference("IndependentBranches") $limit_on_branch = 1; } -my @parts = split( / /, $query ); +my @parts = split( /,\s|\s/, $query ); my @params; foreach my $p (@parts) { push( -- 2.7.4