From: eldy <> Date: Thu, 25 Sep 2003 17:40:31 +0000 (+0000) Subject: Changes to allow an output that is XML compliant X-Git-Tag: AWSTATS_6_0_BETA~230 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ee04dd4fa11e07734f31159758de9c69f71e09b;p=thirdparty%2FAWStats.git Changes to allow an output that is XML compliant --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 790f4b9c..41bb76f1 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -32,7 +32,7 @@ $UseXml /; $DEBUGFORCED=0; # Force debug level to log lesser level into debug.log file (Keep this value to 0) $NBOFLINESFORBENCHMARK=8192; # Benchmark info are printing every NBOFLINESFORBENCHMARK lines (Must be a power of 2) -$FRAMEWIDTH=230; # Width of left frame when UseFramesWhenCGI is on +$FRAMEWIDTH=240; # Width of left frame when UseFramesWhenCGI is on $NBOFLASTUPDATELOOKUPTOSAVE=500; # Nb of records to save in DNS last update cache file $LIMITFLUSH=5000; # Nb of records in data arrays after how we need to flush data on disk $NEWDAYVISITTIMEOUT=764041; # Delay between 01-23:59:59 and 02-00:00:00 @@ -611,12 +611,8 @@ sub html_head { my $AllowIndex=0; # Write head section if ($UseXml) { - if ($PageCode) { - print "\n"; - } - else { - print "\n"; - }; + if ($PageCode) { print "\n"; } + else { print "\n"; }; if ($FrameName ne 'index') { print "\n"; } else { print "\n"; } print "\n"; @@ -628,9 +624,13 @@ sub html_head { print "\n"; if ($AllowIndex) { print "\n"; } else { print "\n"; } - if ($PageCode) { print "\n"; } # If not defined, iso-8859-1 is used in major countries + + # Affiche tag meta content-type + if ($PageCode) { print ($ENV{'HTTP_USER_AGENT'}=~/MSIE|Googlebot/i?"\n":"\n"); } + else { print ($ENV{'HTTP_USER_AGENT'}=~/MSIE|Googlebot/i?"\n":"\n"); }; #else { print "\n"; } #else { print "\n"; } + if ($Expires) { print "\n"; } print "\n"; if ($AllowIndex && $FrameName ne 'mainleft') { print "\n"; } @@ -640,12 +640,10 @@ sub html_head { # A STYLE section must be in head section. Do not use " for number in a style section print "