Bugzilla – Attachment 45132 Details for
Bug 15252
Patron search on start with does not work with several terms
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15252 - Patron search on start with does not work with several terms - followup 1
Bug-15252---Patron-search-on-start-with-does-not-w.patch (text/plain), 1.93 KB, created by
Fridolin Somers
on 2015-11-25 12:12:17 UTC
(
hide
)
Description:
Bug 15252 - Patron search on start with does not work with several terms - followup 1
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2015-11-25 12:12:17 UTC
Size:
1.93 KB
patch
obsolete
>From 0eed1cfd37bb6459b173d76e2a2c77a01fcd65b2 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 25 Nov 2015 12:23:10 +0100 >Subject: [PATCH] Bug 15252 - Patron search on start with does not work with > several terms - followup 1 > >'start_with' is the default value of $searchtype, it can be explicit. >--- > C4/Utils/DataTables/Members.pm | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > >diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm >index 9628b1e..59a7e17 100644 >--- a/C4/Utils/DataTables/Members.pm >+++ b/C4/Utils/DataTables/Members.pm >@@ -13,7 +13,7 @@ sub search { > my $firstletter = $params->{firstletter}; > my $categorycode = $params->{categorycode}; > my $branchcode = $params->{branchcode}; >- my $searchtype = $params->{searchtype}; >+ my $searchtype = $params->{searchtype} || 'start_with'; > my $searchfieldstype = $params->{searchfieldstype} || 'standard'; > my $dt_params = $params->{dt_params}; > >@@ -88,8 +88,7 @@ sub search { > $term .= '%' # end with anything > if $term !~ /%$/; > $term = "%$term" # begin with anythin unless start_with >- if (defined $searchtype) && $searchtype eq "contain" >- && $term !~ /^%/; >+ if $searchtype eq 'contain' && $term !~ /^%/; > > my @where_strs_or; > for my $searchfield ( split /,/, $searchfields->{$searchfieldstype} ) { >@@ -208,11 +207,11 @@ $params is a hashref with some keys: > > =item searchtype > >- Can be 'contain' or 'start_with'. Used for the searchmember parameter. >+ Can be 'contain' or 'start_with' (default value). Used for the searchmember parameter. > > =item searchfieldstype > >- Can be 'standard', 'email', 'borrowernumber', 'phone', 'address' or 'dateofbirth', 'sort1', 'sort2' >+ Can be 'standard' (default value), 'email', 'borrowernumber', 'phone', 'address' or 'dateofbirth', 'sort1', 'sort2' > > =item dt_params > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15252
:
45131
|
45132
|
45133
|
45134
|
45300
|
45301
|
45302
|
45303
|
45390
|
45391
|
45392
|
45393
|
45395
|
45401
|
45403
|
45405
|
45406
|
45407
|
45735
|
45736
|
45737
|
45738
|
45830
|
45831