]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
awstats_buildstaticpages.pl was broken by 6.0 config file format.
authoreldy <>
Sun, 25 Jan 2004 15:19:47 +0000 (15:19 +0000)
committereldy <>
Sun, 25 Jan 2004 15:19:47 +0000 (15:19 +0000)
tools/awstats_buildstaticpages.pl

index 81b59904c4c9b1016045bd5197b7f8aca2a720ba..10083854e6eb2afcedc23309ff34934b49df4eff 100644 (file)
@@ -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