X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=reports%2Freserves_stats.pl;h=792a7721e221b1ec54db8b1f2a3ee7e7f45d2bde;hb=51e3e31627c38f88671f8ab399b470ec4a02aaec;hp=4254d5a2072889bad207c6c679cf435b1efb37ac;hpb=ddbedbfc2f17bff016736afb5beae39a768a298a;p=koha.git diff --git a/reports/reserves_stats.pl b/reports/reserves_stats.pl index 4254d5a207..792a7721e2 100755 --- a/reports/reserves_stats.pl +++ b/reports/reserves_stats.pl @@ -19,8 +19,9 @@ use strict; +use warnings; -use CGI; +use CGI qw ( -utf8 ); use C4::Auth; use C4::Debug; @@ -30,8 +31,8 @@ use C4::Koha; use C4::Output; use C4::Reports; use C4::Members; -use C4::Dates qw/format_date format_date_in_iso/; use C4::Category; +use Koha::DateUtils; use List::MoreUtils qw/any/; use YAML; @@ -47,7 +48,7 @@ plugin that shows circulation stats # my $debug = 1; # override for now. my $input = new CGI; -my $fullreportname = "reports/reserves_stats.tmpl"; +my $fullreportname = "reports/reserves_stats.tt"; my $do_it = $input->param('do_it'); my $line = $input->param("Line"); my $column = $input->param("Column"); @@ -74,10 +75,9 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ flagsrequired => {reports => '*'}, debug => 0, }); -our $sep = $input->param("sep"); +our $sep = $input->param("sep") || ''; $sep = "\t" if ($sep eq 'tabulation'); $template->param(do_it => $do_it, - DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), ); my $itemtypes = GetItemTypes(); @@ -129,7 +129,7 @@ if ($do_it) { print map {$sep.$_->{totalcol}} @$cols; print $sep.@$results[0]->{total}; } - exit(1); # exit either way after $do_it + exit; # exit either way after $do_it } my $dbh = C4::Context->dbh; @@ -139,8 +139,8 @@ my %select; # create itemtype arrayref for