Bugzilla – Attachment 14367 Details for
Bug 8845
Add ability search patrons by date of birth
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8845: Followup Allow to give a date using the syspref format
Bug-8845-Followup-Allow-to-give-a-date-using-the-s.patch (text/plain), 2.03 KB, created by
Kyle M Hall (khall)
on 2013-01-02 18:36:06 UTC
(
hide
)
Description:
Bug 8845: Followup Allow to give a date using the syspref format
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-01-02 18:36:06 UTC
Size:
2.03 KB
patch
obsolete
>From b115e33800ca69e95356a01288e9f210dc1a74b4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 27 Dec 2012 14:18:34 +0100 >Subject: [PATCH] Bug 8845: Followup Allow to give a date using the syspref format > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > members/member.pl | 21 +++++++++++++-------- > 1 files changed, 13 insertions(+), 8 deletions(-) > >diff --git a/members/member.pl b/members/member.pl >index d25dba9..ebf1990 100755 >--- a/members/member.pl >+++ b/members/member.pl >@@ -31,6 +31,7 @@ use CGI; > use C4::Members; > use C4::Branch; > use C4::Category; >+use Koha::DateUtils; > use File::Basename; > > my $input = new CGI; >@@ -95,20 +96,24 @@ else { > @orderby = ({surname=>0},{firstname=>0}); > } > >-my $searchfields = $input->param('searchfields'); >-my @searchfields = $searchfields ? split( ',', $searchfields ) : ( "firstname", "surname", "othernames", "cardnumber", "userid", "email" ); >- >-$member =~ s/,//g; #remove any commas from search string >-$member =~ s/\*/%/g; >- > my $from = ( $startfrom - 1 ) * $resultsperpage; > my $to = $from + $resultsperpage; > > my ($count,$results); > if ($member || keys %$patron) { >- #($results)=Search($member || $patron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"] ); >+ my $searchfields = $input->param('searchfields'); >+ my @searchfields = $searchfields ? split( ',', $searchfields ) : ( "firstname", "surname", "othernames", "cardnumber", "userid", "email" ); >+ >+ $member =~ s/,//g; #remove any commas from search string >+ $member =~ s/\*/%/g; >+ my $search = $member || $patron; >+ >+ if ( $searchfields eq "dateofbirth" ) { >+ $search = output_pref(dt_from_string($search), 'iso', 1); >+ } >+ > my $search_scope = ( $quicksearch ? "field_start_with" : "start_with" ); >- ($results) = Search( $member || $patron, \@orderby, undef, undef, \@searchfields, $search_scope ); >+ ($results) = Search( $search, \@orderby, undef, undef, \@searchfields, $search_scope ); > } > > if ($results) { >-- >1.7.2.5
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 8845
:
12601
|
12608
|
12639
|
14293
|
14367
|
14368
|
14392
|
14393
|
15556
|
15557
|
15558
|
18437
|
18438
|
18439
|
18508
|
18509
|
18510
|
18511