From: eldy <> Date: Sun, 25 Jan 2004 15:19:47 +0000 (+0000) Subject: awstats_buildstaticpages.pl was broken by 6.0 config file format. X-Git-Tag: AWSTATS_6_1_BETA~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bbff278209d026e2f3dd57075fa62e6a143cb56;p=thirdparty%2FAWStats.git awstats_buildstaticpages.pl was broken by 6.0 config file format. --- diff --git a/tools/awstats_buildstaticpages.pl b/tools/awstats_buildstaticpages.pl index 81b59904..10083854 100644 --- a/tools/awstats_buildstaticpages.pl +++ b/tools/awstats_buildstaticpages.pl @@ -201,7 +201,7 @@ sub Parse_Config { } # Remove comments - if ($_ =~ /^#/) { next; } + if ($_ =~ /^\s*#/) { next; } $_ =~ s/\s#.*$//; # Extract param and value @@ -216,7 +216,8 @@ sub Parse_Config { $value =~ s/^\s+//; $value =~ s/\s+$//; $value =~ s/^\"//; $value =~ s/\";?$//; # Replace __MONENV__ with value of environnement variable MONENV - while ($value =~ /__(\w+)__/) { my $var=$1; $value =~ s/__${var}__/$ENV{$var}/g; } + # Must be able to replace __VAR_1____VAR_2__ + while ($value =~ /__([^\s_]+(?:_[^\s_]+)*)__/) { my $var=$1; $value =~ s/__${var}__/$ENV{$var}/g; } } # If parameters was not found previously, defined variable with name of param to value