From: eldy <> Date: Wed, 21 Sep 2005 19:25:48 +0000 (+0000) Subject: Fix: SkipReferrerBlackList renamed into SkipReferrersBlackList X-Git-Tag: AWSTATS_6_5_BETA~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=636beca5883f99e392f2e24d962374b698b4acba;p=thirdparty%2FAWStats.git Fix: SkipReferrerBlackList renamed into SkipReferrersBlackList --- diff --git a/docs/awstats_config.html b/docs/awstats_config.html index 5b8bfc58..949a45e0 100644 --- a/docs/awstats_config.html +++ b/docs/awstats_config.html @@ -809,9 +809,9 @@ when reading it), follow the example:



-SkipReferrerBlackList
+SkipReferrersBlackList
Version : 6.5+
-
# Use SkipReferrerBlackList if you want to exclude records coming from a SPAM +
# Use SkipReferrersBlackList if you want to exclude records coming from a SPAM
# referrer. Parameter must receive a local file name containing rules applied
# on referrer field. If parameter is empty, no filter is applied.
# An example of such a file is available in lib/blacklist.txt @@ -819,8 +819,11 @@ when reading it), follow the example:

# Change : Effective for new updates only
# Example: "/mylibpath/blacklist.txt"
# Default: "" +
+
# WARNING!! Using this feature make AWStats running very slower (5 times slower +
# with black list file provided with AWStats !
# -
SkipReferrerBlackList="" +
SkipReferrersBlackList=""


diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf index 425e7ccb..b3918ee9 100644 --- a/wwwroot/cgi-bin/awstats.model.conf +++ b/wwwroot/cgi-bin/awstats.model.conf @@ -496,7 +496,7 @@ SkipUserAgents="" SkipFiles="" -# Use SkipReferrerBlackList if you want to exclude records coming from a SPAM +# Use SkipReferrersBlackList if you want to exclude records coming from a SPAM # referrer. Parameter must receive a local file name containing rules applied # on referrer field. If parameter is empty, no filter is applied. # An example of such a file is available in lib/blacklist.txt @@ -505,7 +505,10 @@ SkipFiles="" # Example: "/mylibpath/blacklist.txt" # Default: "" # -SkipReferrerBlackList="" +# WARNING!! Using this feature make AWStats running very slower (5 times slower +# with black list file provided with AWStats ! +# +SkipReferrersBlackList="" # Include in stats, only accesses from hosts that match one of following diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 901a02ac..46810b3b 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -1290,7 +1290,7 @@ sub Parse_Config { } next; } - if ($param =~ /^SkipReferrerBlackList/) { + if ($param =~ /^SkipReferrersBlackList/) { open (BLACKLIST, "<$value") || die "Failed to open blacklist: $!\n"; while () { chomp; @@ -6391,8 +6391,8 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat # Skip for some client host IP addresses, some URLs, other URLs if (@SkipHosts && (&SkipHost($field[$pos_host]) || ($pos_hostr && &SkipHost($field[$pos_hostr])))) { $qualifdrop="Dropped record (host $field[$pos_host]".($pos_hostr?" and $field[$pos_hostr]":"")." not qualified by SkipHosts)"; } elsif (@SkipFiles && &SkipFile($field[$pos_url])) { $qualifdrop="Dropped record (URL $field[$pos_url] not qualified by SkipFiles)"; } - elsif (@SkipReferrers && $pos_referer >= 0 && &SkipReferrer($field[$pos_referer])) { $qualifdrop="Dropped record (URL $field[$pos_referer] not qualified by SkipReferrers)"; } elsif (@SkipUserAgents && $pos_agent >= 0 && &SkipUserAgent($field[$pos_agent])) { $qualifdrop="Dropped record (user agent '$field[$pos_agent]' not qualified by SkipUserAgents)"; } + elsif (@SkipReferrers && $pos_referer >= 0 && &SkipReferrer($field[$pos_referer])) { $qualifdrop="Dropped record (URL $field[$pos_referer] not qualified by SkipReferrers)"; } elsif (@OnlyHosts && ! &OnlyHost($field[$pos_host]) && (! $pos_hostr || ! &OnlyHost($field[$pos_hostr]))) { $qualifdrop="Dropped record (host $field[$pos_host]".($pos_hostr?" and $field[$pos_hostr]":"")." not qualified by OnlyHosts)"; } elsif (@OnlyFiles && ! &OnlyFile($field[$pos_url])) { $qualifdrop="Dropped record (URL $field[$pos_url] not qualified by OnlyFiles)"; } elsif (@OnlyUserAgents && ! &OnlyUserAgent($field[$pos_agent])) { $qualifdrop="Dropped record (user agent '$field[$pos_agent]' not qualified by OnlyUserAgents)"; }