[Koha-patches] [PATCH] [bug #2746] Do not allow the user to set an empty expiration date
Nahuel Angelinetti
nahuel.angelinetti at biblibre.com
Thu Oct 30 17:13:20 CET 2008
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
More information about the Koha-patches
mailing list