Bugzilla – Attachment 18438 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.11 KB, created by
Jonathan Druart
on 2013-05-28 15:33:41 UTC
(
hide
)
Description:
Bug 8845: Followup Allow to give a date using the syspref format
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-05-28 15:33:41 UTC
Size:
2.11 KB
patch
obsolete
>From fefc82f78a5e82969ba70368de2b9ba0e6080bb8 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> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > members/member.pl | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) > >diff --git a/members/member.pl b/members/member.pl >index d705810..39ae379 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,25 +96,22 @@ 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 $searchtype = $input->param('searchtype'); >-my %searchtype_ok = ( 'contain' => 1 ); >-if ( !defined($searchtype_ok{$searchtype}) ) { >- undef $searchtype; >-} >- > 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 $search_scope = $searchtype || ( $quicksearch ? "field_start_with" : "start_with" ); >+ my $searchfields = $input->param('searchfields'); >+ my @searchfields = $searchfields ? split( ',', $searchfields ) : ( "firstname", "surname", "othernames", "cardnumber", "userid", "email" ); >+ >+ if ( $searchfields eq "dateofbirth" ) { >+ $member = output_pref(dt_from_string($member), 'iso', 1); >+ } >+ >+ my $search_scope = ( $quicksearch ? "field_start_with" : "start_with" ); > ($results) = Search( $member || $patron, \@orderby, undef, undef, \@searchfields, $search_scope ); > } > >-- >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 8845
:
12601
|
12608
|
12639
|
14293
|
14367
|
14368
|
14392
|
14393
|
15556
|
15557
|
15558
|
18437
|
18438
|
18439
|
18508
|
18509
|
18510
|
18511