]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Selection of virtualhost records in a log is no more case sensitive on SiteDomain...
authoreldy <>
Mon, 15 Sep 2003 14:06:01 +0000 (14:06 +0000)
committereldy <>
Mon, 15 Sep 2003 14:06:01 +0000 (14:06 +0000)
wwwroot/cgi-bin/awstats.model.conf
wwwroot/cgi-bin/awstats.pl

index 494389a8de22ffc5579792ee911bd8d60ce4d95b..2453f6c183cf5e50a588b584a8a5761a695bfe26 100644 (file)
@@ -95,8 +95,8 @@ LogType=W
 #   %email            EMail sender (for mail log)
 #   %email_r          EMail receiver (for mail log)
 #   %virtualname      Web sever virtual hostname. Use this tag when same log
-#                     file contains data of several virtual web servers. The
-#                     SiteDomain will be used to filter the one you want.
+#                     contains data of several virtual web servers. AWStats
+#                     will discard records not in SiteDomain nor HostAliases
 #   If your log format has some fields not included in this list, use
 #   %other            Means another field not used
 #
index 4637ddd9f79a6be61981b9e4e3ccfe1fca86c408..c2011253164fbafd4b7cefa20cebae2e941dccc8 100644 (file)
@@ -1329,8 +1329,8 @@ sub Read_Ref_Data {
                                                push @INC, "$dir";
                                                $DirAddedInINC{"$dir"}=1;
                                        }
-                                       #my $loadret=require "$FilePath{$file}";
-                                       my $loadret=(require "$FilePath{$file}"||require "${file}");
+                                       my $loadret=require "$file";
+                                       #my $loadret=(require "$FilePath{$file}"||require "${file}");
                                }
                        }
                }
@@ -1799,7 +1799,8 @@ sub Read_Plugins {
                                                        $DirAddedInINC{"$dir"}=1;
                                                }
                                                #my $loadret=require "$pluginpath";
-                                               my $loadret=(require "$pluginpath"||require "${pluginfile}.pm");
+                                               my $loadret=require "${pluginfile}.pm";
+                                               #my $loadret=(require "$pluginpath"||require "${pluginfile}.pm");
 
                                                if (! $loadret || $loadret =~ /^error/i) {
                                                        # Load failed, we stop here
@@ -4094,9 +4095,9 @@ sub AltTitle {
 }
 
 #--------------------------------------------------------------------
-# Function:            Tell if an email is an local or external email
+# Function:            Tell if an email is a local or external email
 # Parameters:   email
-# Input:        $SiteDomain $HostAliases
+# Input:        $SiteDomain(exact string) $HostAliases(quoted regex string)
 # Output:       None
 # Return:       -1, 0 or 1
 #--------------------------------------------------------------------
@@ -4104,7 +4105,7 @@ sub IsLocalEMail {
        my $email=shift||'unknown';
        if ($email !~ /\@(.*)$/) { return 0; }
        my $domain=$1;
-       if ($domain eq $SiteDomain) { return 1; }
+       if ($domain =~ /^$SiteDomain$/i) { return 1; }
        foreach my $match (@HostAliases) { if ($domain =~ /$match/i) { return 1; } }
        return -1;
 }
@@ -4467,7 +4468,7 @@ sub ShowURLInfo {
                                print "<A HREF=\"$newkey\" target=\"url\">$nompage</A>";
                        }
                        elsif ($newkey =~ /^\//) {              # URL seems to be an url extracted from a web or wap server log file
-                               $newkey =~ s/^\/$SiteDomain//;
+                               $newkey =~ s/^\/$SiteDomain//i;
                                # Define urlprot
                                my $urlprot='http';
                                if ($UseHTTPSLinkForUrl && $newkey =~ /^$UseHTTPSLinkForUrl/) { $urlprot='https'; }
@@ -5540,10 +5541,10 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') {        # Updat
 
                # Check virtual host name
                #----------------------------------------------------------------------
-               if ($pos_vh>=0 && $field[$pos_vh] ne $SiteDomain) {
+               if ($pos_vh>=0 && $field[$pos_vh] !~ /^$SiteDomain$/i) {
                        my $skip=1;\r
                        foreach my $key (@HostAliases) {\r
-                               if ($field[$pos_vh] =~ m/^$key$/) { $skip=0; next; }\r
+                               if ($field[$pos_vh] =~ m/$key$/i) { $skip=0; next; }\r
                        }\r
                        if ($skip) {\r
                                $NbOfLinesDropped++;\r