X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=reports%2Fissues_stats.pl;h=34911b2804cbf747b8582871a852f10e53a5ec39;hb=aa14476ebc040466decf0bfe77ba7aec928b8647;hp=4b6aa42541710709638143f4cd99b239424f567c;hpb=0486d0c6b781fbda73df19eb825ef330bdc4544a;p=koha.git diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index 4b6aa42541..34911b2804 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -1,27 +1,26 @@ #!/usr/bin/perl - # Copyright 2000-2002 Katipo Communications # # This file is part of Koha. # -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . use strict; #use warnings; FIXME - Bug 2505 -use CGI; +use CGI qw ( -utf8 ); use Date::Manip; use C4::Auth; @@ -32,28 +31,30 @@ use C4::Koha; use C4::Output; use C4::Circulation; use C4::Reports; -use C4::Dates qw/format_date format_date_in_iso/; use C4::Members; +use Koha::DateUtils; =head1 NAME -plugin that shows circulation stats +reports/issues_stats.pl =head1 DESCRIPTION -=over 2 +Plugin that shows circulation stats =cut # my $debug = 1; # override for now. my $input = new CGI; -my $fullreportname = "reports/issues_stats.tmpl"; +my $fullreportname = "reports/issues_stats.tt"; my $do_it = $input->param('do_it'); my $line = $input->param("Line"); my $column = $input->param("Column"); -my @filters = $input->param("Filter"); -$filters[0]=format_date_in_iso($filters[0]); -$filters[1]=format_date_in_iso($filters[1]); +my @filters = $input->multi_param("Filter"); +$filters[0] = eval { output_pref( { dt => dt_from_string( $filters[0]), dateonly => 1, dateformat => 'iso' } ); } + if ( $filters[0] ); +$filters[1] = eval { output_pref( { dt => dt_from_string( $filters[1]), dateonly => 1, dateformat => 'iso' } ); } + if ( $filters[1] ); my $podsp = $input->param("DisplayBy"); my $type = $input->param("PeriodTypeSel"); my $daysel = $input->param("PeriodDaySel"); @@ -72,7 +73,6 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ 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(); @@ -133,8 +133,8 @@ my %select; # create itemtype arrayref for