From: eldy <>
Date: Mon, 23 Jun 2003 01:44:19 +0000 (+0000)
Subject: Apply part of patch 746053.
X-Git-Tag: AWSTATS_5_6_RELEASE~17
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1ecc2fc6a988748ad9937cd2f4168ce5c8b206e;p=thirdparty%2FAWStats.git
Apply part of patch 746053.
---
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index 5d8d1479..082d22b5 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -1065,6 +1065,10 @@ sub Parse_Config {
# Correct relative include files
if ($FileConfig =~ /^(.*[\\\/])[^\\\/]*$/) { $includeFile = "$1$includeFile"; }
}
+ if ($level > 1) {
+ warning("Warning: Perl versions before 5.6 cannot handle nested includes");
+ next;
+ }
if ( open( CONFIG_INCLUDE, $includeFile ) ) {
&Parse_Config( *CONFIG_INCLUDE , $level+1, $includeFile);
close( CONFIG_INCLUDE );
@@ -1302,11 +1306,11 @@ sub Read_Language_Data {
$i++;
}
}
+ close(LANG);
}
else {
warning("Warning: Can't find language files for \"$_[0]\". English will be used.");
}
- close(LANG);
}
@@ -6809,7 +6813,7 @@ if (scalar keys %HTMLOutput) {
foreach my $key (@keylist) {
my $host=CleanFromCSSA($key);
print "
| ".($_robot_l{$key}?'':'')."$host".($_robot_l{$key}?'':'')." | ";
- ShowHostInfo($key);
+ &ShowHostInfo($key);
if ($ShowHostsStats =~ /P/i) { print "".($_host_p{$key}?$_host_p{$key}:" ")." | "; }
if ($ShowHostsStats =~ /H/i) { print "$_host_h{$key} | "; }
if ($ShowHostsStats =~ /B/i) { print "".Format_Bytes($_host_k{$key})." | "; }
@@ -6825,7 +6829,7 @@ if (scalar keys %HTMLOutput) {
$rest_k=$TotalBytes-$total_k;
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other visitors (known or not)
print "
| $Message[2] | ";
- ShowHostInfo('');
+ &ShowHostInfo('');
if ($ShowHostsStats =~ /P/i) { print "".($rest_p?$rest_p:" ")." | "; }
if ($ShowHostsStats =~ /H/i) { print "$rest_h | "; }
if ($ShowHostsStats =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
@@ -6851,7 +6855,7 @@ if (scalar keys %HTMLOutput) {
foreach my $key (@keylist) {
my $host=CleanFromCSSA($key);
print "
| $host | ";
- ShowHostInfo($key);
+ &ShowHostInfo($key);
if ($ShowHostsStats =~ /P/i) { print "".($_host_p{$key}?$_host_p{$key}:" ")." | "; }
if ($ShowHostsStats =~ /H/i) { print "$_host_h{$key} | "; }
if ($ShowHostsStats =~ /B/i) { print "".Format_Bytes($_host_k{$key})." | "; }
@@ -6868,7 +6872,7 @@ if (scalar keys %HTMLOutput) {
$rest_k=$TotalBytes-$total_k;
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other visitors (known or not)
print "
| $Message[82] | ";
- ShowHostInfo('');
+ &ShowHostInfo('');
if ($ShowHostsStats =~ /P/i) { print "".($rest_p?$rest_p:" ")." | "; }
if ($ShowHostsStats =~ /H/i) { print "$rest_h | "; }
if ($ShowHostsStats =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
@@ -6981,7 +6985,7 @@ if (scalar keys %HTMLOutput) {
if ($HTMLOutput{'lastlogins'}) { $title.="$Message[9]"; }
&tab_head("$title",19);
print "
| $Message[94] : ".(scalar keys %_login_h)." | ";
- ShowUserInfo('');
+ &ShowUserInfo('');
if ($ShowAuthenticatedUsers =~ /P/i) { print "$Message[56] | "; }
if ($ShowAuthenticatedUsers =~ /H/i) { print "$Message[57] | "; }
if ($ShowAuthenticatedUsers =~ /B/i) { print "$Message[75] | "; }
@@ -6993,7 +6997,7 @@ if (scalar keys %HTMLOutput) {
if ($HTMLOutput{'lastlogins'}) { &BuildKeyList($MaxRowsInHTMLOutput,$MinHit{'Host'},\%_login_h,\%_login_l); }
foreach my $key (@keylist) {
print "
|---|
| $key | ";
- ShowUserInfo($key);
+ &ShowUserInfo($key);
if ($ShowAuthenticatedUsers =~ /P/i) { print "".($_login_p{$key}?$_login_p{$key}:" ")." | "; }
if ($ShowAuthenticatedUsers =~ /H/i) { print "$_login_h{$key} | "; }
if ($ShowAuthenticatedUsers =~ /B/i) { print "".Format_Bytes($_login_k{$key})." | "; }
@@ -7010,7 +7014,7 @@ if (scalar keys %HTMLOutput) {
$rest_k=$TotalBytes-$total_k;
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other logins and/or anonymous
print "
| $Message[125] | ";
- ShowUserInfo('');
+ &ShowUserInfo('');
if ($ShowAuthenticatedUsers =~ /P/i) { print "".($rest_p?$rest_p:" ")." | "; }
if ($ShowAuthenticatedUsers =~ /H/i) { print "$rest_h | "; }
if ($ShowAuthenticatedUsers =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }
@@ -8143,7 +8147,6 @@ if (scalar keys %HTMLOutput) {
my $title="$Message[81] ($Message[77] $MaxNbOf{'HostsShown'}) - $Message[80] - $Message[9] - $Message[45]";
&tab_head("$title",19);
print "
";
- # print "| ";
print " | ";
if ($MonthRequired ne 'all') { print "$Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11] | "; }
else { print "$Message[81] : ".(scalar keys %_host_h).""; }
@@ -8159,7 +8162,7 @@ if (scalar keys %HTMLOutput) {
foreach my $key (@keylist) {
print "
";
print "| $key | ";
- ShowHostInfo($key);
+ &ShowHostInfo($key);
if ($ShowHostsStats =~ /P/i) { print "".($_host_p{$key}||" ")." | "; }
if ($ShowHostsStats =~ /H/i) { print "$_host_h{$key} | "; }
if ($ShowHostsStats =~ /B/i) { print "".Format_Bytes($_host_k{$key})." | "; }
@@ -8291,7 +8294,7 @@ if (scalar keys %HTMLOutput) {
if ($ShowAuthenticatedUsers =~ /L/i) { $title.=" - $Message[9]"; }
&tab_head("$title",19);
print "
| $Message[94] : ".(scalar keys %_login_h)." | ";
- ShowUserInfo('');
+ &ShowUserInfo('');
if ($ShowAuthenticatedUsers =~ /P/i) { print "$Message[56] | "; }
if ($ShowAuthenticatedUsers =~ /H/i) { print "$Message[57] | "; }
if ($ShowAuthenticatedUsers =~ /B/i) { print "$Message[75] | "; }
@@ -8308,7 +8311,7 @@ if (scalar keys %HTMLOutput) {
if ($max_h > 0) { $bredde_h=int($BarWidth*$_login_h{$key}/$max_h)+1; }
if ($max_k > 0) { $bredde_k=int($BarWidth*$_login_k{$key}/$max_k)+1; }
print "
|---|
| $key | ";
- ShowUserInfo($key);
+ &ShowUserInfo($key);
if ($ShowAuthenticatedUsers =~ /P/i) { print "".($_login_p{$key}?$_login_p{$key}:" ")." | "; }
if ($ShowAuthenticatedUsers =~ /H/i) { print "$_login_h{$key} | "; }
if ($ShowAuthenticatedUsers =~ /B/i) { print "".Format_Bytes($_login_k{$key})." | "; }
@@ -8329,7 +8332,7 @@ if (scalar keys %HTMLOutput) {
$rest_k=$TotalBytes-$total_k;
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other logins
print "
| $Message[125] | ";
- ShowUserInfo('');
+ &ShowUserInfo('');
if ($ShowAuthenticatedUsers =~ /P/i) { print "".($rest_p?$rest_p:" ")." | "; }
if ($ShowAuthenticatedUsers =~ /H/i) { print "$rest_h | "; }
if ($ShowAuthenticatedUsers =~ /B/i) { print "".Format_Bytes($rest_k)." | "; }