From 36fb5ea3c05a2ac82db0e482f5eda611793917b7 Mon Sep 17 00:00:00 2001 From: Nahuel Angelinetti Date: Thu, 30 Oct 2008 17:06:56 +0100 Subject: [PATCH] [bug #2746] Do not allow the user to set an empty expiration date If we empty the expiration date field, 0000-00-00 date is putted in the db. This patch keep the expiration date in the db, if the posted form have an empty account expiration date. --- members/memberentry.pl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index dba1818..60af896 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -129,6 +129,7 @@ if ($op eq 'insert' || $op eq 'modify' || $op eq 'save') { push(@errors,"ERROR_$_"); } } + $newdata{'dateexpiry'} = $data{'dateexpiry'} unless $newdata{'dateexpiry'}; # check permission to modify login info. if (ref($borrower_data) && ($borrower_data->{'category_type'} eq 'S') && ! (C4::Auth::haspermission($dbh,$userenv->{'id'},{'staffaccess'=>1})) ) { $NoUpdateLogin =1; -- 1.5.6.3