From db8bda86ea9325651e29a24df7cefbc0c86bee20 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 4 Mar 2010 16:15:47 +0000 Subject: [PATCH] Search Patrons - Make patron search more forgiving. Patron search has only been searching fields for names that either match or begin with the given search terms. This is too strict a search. For example, take the name "Billie Jo Robinson", "Billie Jo" being the firstname, and "Robinson" being the last name. If one were to search for "Billie Jo", this patron would not appear in the search results. To remedy this, the search type has been changed from 'begins_with' to 'contain'. Signed-off-by: Galen Charlton --- members/member.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/members/member.pl b/members/member.pl index aaa3c0e911..700f200efd 100755 --- a/members/member.pl +++ b/members/member.pl @@ -94,7 +94,7 @@ push @searchpatron, $patron if (keys %$patron); my $from= ($startfrom-1)*$resultsperpage; my $to=$from+$resultsperpage; #($results)=Search(\@searchpatron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"] ) if (@searchpatron); - my $search_scope=($quicksearch?"field_start_with":"start_with"); + my $search_scope=($quicksearch?"field_start_with":"contain"); ($results)=Search(\@searchpatron,\@orderby,undef,undef,["firstname","surname","email","othernames","cardnumber","userid"],$search_scope ) if (@searchpatron); if ($results){ $count =scalar(@$results); -- 2.39.5