Bugzilla – Attachment 45736 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), 2.11 KB, created by
Marc Véron
on 2015-12-16 17:43:22 UTC
(
hide
)
Description:
Bug 15252 - Patron search on start with does not work with several terms - followup 1
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-12-16 17:43:22 UTC
Size:
2.11 KB
patch
obsolete
>From 8e933e3320d822b2fd5e5f1d5baab064c50ce979 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 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >'start_with' is the default value of $searchtype, it can be explicit. > >Tested 4 patches together, works as expected >Signed-off-by: Marc Véron <veron@veron.ch> >--- > 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 31af767..1ebecd7 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}; > >@@ -90,8 +90,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} ) { >@@ -210,11 +209,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 > >-- >1.7.10.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