From: Eric Bollengier Date: Tue, 21 Oct 2008 12:40:19 +0000 (+0000) Subject: ebl Fix btime with debug=1 X-Git-Tag: Release-3.0.0~737 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9f42e0e87c60a8054525f78d2272ba201d18f6ca;p=bacula%2Fbacula ebl Fix btime with debug=1 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7864 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/cgi/btime.pl b/gui/bweb/cgi/btime.pl index 12425867ee..6a7b3d61b0 100755 --- a/gui/bweb/cgi/btime.pl +++ b/gui/bweb/cgi/btime.pl @@ -45,6 +45,9 @@ my $conf = new Bweb::Config(config_file => $Bweb::config_file); $conf->load(); my $bweb = new Bweb(info => $conf); + +print CGI::header('text/html'); +$bweb->display_begin(); $bweb->can_do('r_view_stat'); my $arg = $bweb->get_form(qw/qnocache qiso_begin qiso_end qusage qpools @@ -57,12 +60,10 @@ if (!$arg->{qiso_begin}) { $arg->{qiso_end} = strftime('\'%F %H:%M:00\'', localtime(time)); } use Digest::MD5 qw(md5_hex); + my $md5_rep = md5_hex("$arg->{qiso_begin}:$arg->{qiso_end}:$arg->{qusage}:" . "$arg->{jclient_groups}:$arg->{qpoolusage};$arg->{qnojob}") ; -print CGI::header('text/html'); -$bweb->display_begin(); - if ( !$arg->{qnocache} && $arg->{qiso_begin} && -f "$conf->{fv_write_path}/$md5_rep.png") @@ -150,7 +151,7 @@ FROM Log INNER JOIN Job USING (JobId) JOIN Pool USING (PoolId) ORDER BY Job.JobId,Log.LogId,Log.Time "; -print STDERR $query if (1 || $conf->{debug}); +$bweb->debug($query); my $all = $bweb->dbh_selectall_arrayref($query); my $lastid = 0;