From: eldy <>
Date: Sat, 5 Jul 2003 12:12:01 +0000 (+0000)
Subject: Count add to favourites on MSIE only.
X-Git-Tag: AWSTATS_5_7_BETA~76
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8dcc62214e5fbdf6655f9d000c828b2ac701de4;p=thirdparty%2FAWStats.git
Count add to favourites on MSIE only.
---
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index 8a16c2be..2464eb41 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -5318,7 +5318,9 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat
# Check favicon
#-----------------------------------------------
elsif ($field[$pos_url] =~ /\/favicon\.ico$/i) {
- if ($field[$pos_code] != 404 || $field[$pos_url] !~ /\/.+\/favicon\.ico$/i) { # We don't count on hit if not on root and error as another hit will be made on root
+ if (($field[$pos_code] != 404 || $field[$pos_url] !~ /\/.+\/favicon\.ico$/i) && ($field[$pos_agent] =~ /MSIE/)) {
+ # We don't count one hit if (not on root and error) and MSIE
+ # If error not on root, another hit will be made on root. If not MSIE, hit are made not only for "Adding".
$_misc_h{'AddToFavourites'}++; # Hit on favicon on root or without error, we count it
}
next;
@@ -8890,6 +8892,14 @@ if (scalar keys %HTMLOutput) {
if ($ShowMiscStats) {
if ($Debug) { debug("ShowMiscStats",2); }
print "$Center
\n";
+ my $Totalh=0; my %new_browser_h=();
+ if ($_misc_h{'AddToFavourites'}) {
+ foreach my $key (keys %_browser_h) {
+ $Totalh+=$_browser_h{$key};
+ if ($key =~ /^msie/i) { $new_browser_h{"msiecumul"}+=$_browser_h{$key}; }
+ }
+ if ($new_browser_h{'msiecumul'}) { $_misc_h{'AddToFavourites'}=int(0.5+$_misc_h{'AddToFavourites'}*$Totalh/$new_browser_h{'msiecumul'}); }
+ }
my $title="$Message[139]";
&tab_head("$title",19);
print "