From 5d0a5eb01e954f65c0e6a026455cdb2a6ffc3fd0 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 20 Dec 2007 20:22:24 -0600 Subject: [PATCH] Fixing a problem that was causing double conversion of dates Signed-off-by: Joshua Ferraro --- C4/Members.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index d94761bdba..8b3744c34c 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -656,9 +656,12 @@ sub AddMember { my $dbh = C4::Context->dbh; $data{'userid'} = '' unless $data{'password'}; $data{'password'} = md5_base64( $data{'password'} ) if $data{'password'}; - $data{'dateofbirth'} = format_date_in_iso( $data{'dateofbirth'} ); - $data{'dateenrolled'} = format_date_in_iso( $data{'dateenrolled'}); - $data{'dateexpiry'} = format_date_in_iso( $data{'dateexpiry'} ); + + # WE SHOULD NEVER PASS THIS SUBROUTINE ANYTHING OTHER THAN ISO DATES + # IF YOU UNCOMMENT THESE LINES YOU BETTER HAVE A DARN COMPELLING REASON +# $data{'dateofbirth'} = format_date_in_iso( $data{'dateofbirth'} ); +# $data{'dateenrolled'} = format_date_in_iso( $data{'dateenrolled'}); +# $data{'dateexpiry'} = format_date_in_iso( $data{'dateexpiry'} ); # This query should be rewritten to use "?" at execute. my $query = "insert into borrowers set cardnumber=" . $dbh->quote( $data{'cardnumber'} )