]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
New plugins are not enabled by default.
authoreldy <>
Wed, 2 Jun 2004 21:13:24 +0000 (21:13 +0000)
committereldy <>
Wed, 2 Jun 2004 21:13:24 +0000 (21:13 +0000)
tools/webmin/awstats/edit_config.cgi

index c3280743054442cb8a65c8c9c4cd9b637b64f3cf..7e16db5e53f8b20c0098b385abc9983245c0b706 100644 (file)
@@ -470,9 +470,7 @@ if ($in{'advanced'} == 4) {
                if ($_ =~ /^#?LoadPlugin/i) {
                        # Extract param and value
                        my ($load,$value)=split(/=/,$_,2);
-                       my $active=0;
                        # Remove comments not at beginning of line
-                       if ($load !~ /#.*LoadPlugin/i) { $active=1; }
                        $param =~ s/^\s+//; $param =~ s/\s+$//;
                        $value =~ s/#.*$//; 
                        $value =~ s/^[\s\'\"]+//g; $value =~ s/[\s\'\"]+$//g;
@@ -481,8 +479,10 @@ if ($in{'advanced'} == 4) {
                        if (! $pluginlinefound{$value1}) {      # To avoid plugin to be shown twice
                                $pluginlinefound{$value1}=1;
                                push @pconfparam, $value1;
-                               push @pconfactive, $active;
                                push @pconfvaluep, $value2;
+                       my $active=0;
+                       if ($load !~ /#.*LoadPlugin/i) { $active=1; }
+                               push @pconfactive, $active;
                        }
                }       
        }
@@ -497,9 +497,7 @@ if ($in{'advanced'} == 4) {
                        if ($_ =~ /^#?LoadPlugin/i) {
                                # Extract param and value
                                my ($load,$value)=split(/=/,$_,2);
-                               my $active=0;
                                # Remove comments not at beginning of line
-                               if ($load !~ /#.*LoadPlugin/i) { $active=1; }
                                $param =~ s/^\s+//; $param =~ s/\s+$//;
                                $value =~ s/#.*$//; 
                                $value =~ s/^[\s\'\"]+//g; $value =~ s/[\s\'\"]+$//g;
@@ -507,8 +505,10 @@ if ($in{'advanced'} == 4) {
                                if ($value1 =~ /^graph3d$/i) { next; }
                                if (! $pluginlinefound{$value1}) {      # To avoid plugin to be shown twice
                                        push @pconfparam, $value1;
-                                       push @pconfactive, $active;
                                        push @pconfvaluep, $value2;
+                    # Plugin in sample but not in config file is by default not enabled.
+                               my $active=0;
+                                       push @pconfactive, $active;
                                }
                        }       
                }