From a8e1618c3f2ae0e431052c741d1e43f6aada7256 Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Wed, 19 Dec 2007 12:29:02 -0600 Subject: [PATCH] viewlog.pl - fixes bug 1657, passes DHTMLcalendar_dateformat Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- tools/viewlog.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 0d5379eea1..69254fc8e5 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -27,6 +27,12 @@ use C4::Dates; use C4::Output; use C4::Log; +use vars qw($debug); + +BEGIN { + $debug = $ENV{DEBUG} || 0; +} + =head1 viewlog.pl plugin that shows a stats on borrowers @@ -34,6 +40,7 @@ plugin that shows a stats on borrowers =cut my $input = new CGI; +$debug or $debug = $input->param('debug') || 0; my $do_it = $input->param('do_it'); my $module = $input->param("module"); my $user = $input->param("user"); @@ -58,6 +65,12 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); +$template->param( + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), + dateformat => C4::Dates->new()->format(), + debug => $debug, +); + if ($do_it) { my $results = GetLogs($datefrom,$dateto,$user,$module,$action,$object,$info); @@ -119,7 +132,6 @@ if ($do_it) { total => 0, CGIextChoice => $CGIextChoice, CGIsepChoice => $CGIsepChoice, - DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), ); output_html_with_http_headers $input, $cookie, $template->output; } -- 2.39.2