From b70e1cd0530bafb9f97973c65395ec3e31c2e2d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Tue, 27 Oct 2015 17:50:21 +0100 Subject: [PATCH] Bug 14903: (followup)Remove C4::Dates from circ/circulation.pl Follow up to fix QA issues from comment #15 ...and amended for comment #18 Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- circ/circulation.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 1812061ebf..bac91d7497 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -174,7 +174,8 @@ for my $barcode ( @$barcodes ) { my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate'); my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate'); -$duedatespec = eval { output_pref( { dt => dt_from_string( $duedatespec ), dateformat => 'iso' }); }; +$duedatespec = eval { output_pref( { dt => dt_from_string( $duedatespec ), dateformat => 'iso' }); } + if ( $duedatespec ); my $issueconfirmed = $query->param('issueconfirmed'); my $cancelreserve = $query->param('cancelreserve'); @@ -203,11 +204,11 @@ if( $onsite_checkout && !$duedatespec_allow ) { $datedue = output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); $datedue .= ' 23:59:00'; } elsif( $duedatespec_allow ) { - if ($datedue) { - $datedue = eval { dt_from_string( $datedue ) }; + if ( $duedatespec ) { + $datedue = eval { dt_from_string( $duedatespec ) }; if (! $datedue ) { $invalidduedate = 1; - $template->param( IMPOSSIBLE=>1, INVALID_DATE=>$datedue ); + $template->param( IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec ); } } } -- 2.39.5