From 4c9894889b994c2056f637689352e030624a5578 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Sun, 8 Nov 2015 22:14:59 +0100 Subject: [PATCH] Bug 14870: (followup) Remove stray C4::Dates from circ/returns.pl This patch removes 1 remaining / stray occurence of C4::Dates from circ/returns.pl To test: - Apply patch - Go to Home > Circulation > Check in - Verfiy that check-ins with overriding return dates work as before. Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- circ/returns.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index bb47552587..4039c75f7d 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -211,9 +211,8 @@ my $return_date_override_remember = $query->param('return_date_override_remember'); if ($return_date_override) { if ( C4::Context->preference('SpecifyReturnDate') ) { - # FIXME we really need to stop adding more uses of C4::Dates - if ( $return_date_override =~ C4::Dates->regexp('syspref') ) { - + my $return_date_override_dt = eval {dt_from_string( $return_date_override ) }; + if ( $return_date_override_dt ) { # note that we've overriden the return date $template->param( return_date_was_overriden => 1); # Save the original format if we are remembering for this series @@ -222,9 +221,8 @@ if ($return_date_override) { return_date_override_remember => 1 ) if ($return_date_override_remember); - my $dt = dt_from_string($return_date_override); $return_date_override = - DateTime::Format::MySQL->format_datetime($dt); + DateTime::Format::MySQL->format_datetime( $return_date_override_dt ); } } else { -- 2.39.5