From 8e97a740bfcebe977b27c800ba964daf04d40db3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 21 Jan 2014 15:09:01 +0100 Subject: [PATCH] =?utf8?q?max=5Ffuture=5Fbooking=5Finterval=20auch=20ohne?= =?utf8?q?=20wert=20von=20$form->{closedto}=20schreiben=20Ferner=20den=20W?= =?utf8?q?ert=20von=20conv=5Fdate=20nach=20conv=5Fi=20=C3=BCberpr=C3=BCft?= =?utf8?q?=20und=20revtrans=20als=20veraltete=20=C3=9Cberpr=C3=BCfung=20ei?= =?utf8?q?ngestuft?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/AM.pm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/SL/AM.pm b/SL/AM.pm index 8b2d7b292..ed896e1ad 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -1120,16 +1120,14 @@ sub closebooks { my ($query, @values); - if ($form->{revtrans}) { - $query = qq|UPDATE defaults SET closedto = NULL, revtrans = '1'|; + # is currently NEVER trueish (no more hidden revtrans in $form) + # if ($form->{revtrans}) { + # $query = qq|UPDATE defaults SET closedto = NULL, revtrans = '1'|; + # -> therefore you can only set this to false (which is already the default) + # and this flag is currently only checked in gl.pl. TOOD Can probably be removed - } elsif ($form->{closedto}) { $query = qq|UPDATE defaults SET closedto = ?, max_future_booking_interval = ?, revtrans = '0'|; - @values = (conv_date($form->{closedto}), conv_date($form->{max_future_booking_interval})); - - } else { - $query = qq|UPDATE defaults SET closedto = NULL, revtrans = '0'|; - } + @values = (conv_date($form->{closedto}), conv_i($form->{max_future_booking_interval})); # set close in defaults do_query($form, $dbh, $query, @values); -- 2.20.1