From 6579abd6bcd5fb5e3a64b6ea6a9e5396576f4382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Mon, 28 Sep 2015 16:44:30 +0200 Subject: [PATCH] [SIGNED-OFF]Bug 14916 - Remove C4::Dates from circ/overdue.pl Patch to remove deprectated C4::Dates from circ/overdue.pl To test: - Tests without patch: - Make sure that you have patron(s) with overdues. - Go to Home > Circulation > Overdues - Apply date filter, perform CSV download Apply patch, then - Reload page - Check that everything behaves as before Signed-off-by: Hector Castro Works as advertised. Tested with dateformat syspref --- circ/overdue.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index 01a80d2..e4c8f85 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -27,7 +27,6 @@ use CGI qw(-oldstyle_urls -utf8); use C4::Auth; use C4::Branch; use C4::Debug; -use C4::Dates qw/format_date format_date_in_iso/; use Text::CSV_XS; use Koha::DateUtils; use DateTime; @@ -43,8 +42,10 @@ my $branchfilter = $input->param('branch') || ''; my $homebranchfilter = $input->param('homebranch') || ''; my $holdingbranchfilter = $input->param('holdingbranch') || ''; my $op = $input->param('op') || ''; -my $dateduefrom = format_date_in_iso($input->param( 'dateduefrom' )) || ''; -my $datedueto = format_date_in_iso($input->param( 'datedueto' )) || ''; +my $dateduefrom = ''; +$dateduefrom = output_pref({ dt => dt_from_string( $input->param( 'dateduefrom' ) ), dateformat => 'iso', dateonly => 1 }) if ( $input->param( 'dateduefrom' ) ); +my $datedueto = ''; +$datedueto = output_pref({ dt => dt_from_string( $input->param( 'datedueto' ) ), dateformat => 'iso', dateonly => 1 }) if ( $input->param( 'datedueto' ) ); # FIXME This is a kludge to include times if ($datedueto) { $datedueto .= ' 23:59'; @@ -348,7 +349,7 @@ if ($noreport) { barcode => $data->{barcode}, cardnumber => $data->{cardnumber}, itemnum => $data->{itemnumber}, - issuedate => format_date($data->{issuedate}), + issuedate => output_pref({ dt => dt_from_string( $data->{issuedate} ), dateonly => 1 }), borrowertitle => $data->{borrowertitle}, surname => $data->{surname}, firstname => $data->{firstname}, -- 1.7.10.4