From: manolamancha <> Date: Mon, 17 May 2010 12:35:58 +0000 (+0000) Subject: Moved Safari browser info and browser families to browsers.pm and os families to... X-Git-Tag: AWSTATS_7_0_BETA2~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9986b1606d0bca783e67a3447c218689ade9506b;p=thirdparty%2FAWStats.git Moved Safari browser info and browser families to browsers.pm and os families to os.pm --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index ff5b93b1..5c4475e6 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -355,7 +355,7 @@ use vars qw/ use vars qw/ @MiscListOrder %MiscListCalc %OSFamily %BrowsersFamily @SessionsRange %SessionsAverage - %LangBrowserToLangAwstats %LangAWStatsToFlagAwstats %SafariBuildToVersion + %LangBrowserToLangAwstats %LangAWStatsToFlagAwstats %BrowsersSafariBuildToVersionHash @HostAliases @AllowAccessFromWebToFollowingAuthenticatedUsers @DefaultFile @SkipDNSLookupFor @SkipHosts @SkipUserAgents @SkipFiles @SkipReferrers @NotPageFiles @@ -387,22 +387,6 @@ use vars qw/ 'WindowsMediaPlayerSupport' => 'hm', 'PDFSupport' => 'hm' ); -%OSFamily = ( - 'win' => 'Windows', - 'mac' => 'Macintosh', - 'linux' => 'Linux', - 'bsd' => 'BSD' -); -%BrowsersFamily = ( - 'msie' => 1, - 'firefox' => 2, - 'netscape' => 3, - 'svn' => 4, - 'opera' => 5, - 'safari' => 6, - 'chrome' => 7, - 'konqueror' => 8 -); @SessionsRange = ( '0s-30s', '30s-2mn', '2mn-5mn', '5mn-15mn', '15mn-30mn', '30mn-1h', '1h+' ); %SessionsAverage = ( @@ -470,54 +454,6 @@ use vars qw/ 'sr' => 'cs' ); -# TODO Remove this old array for an old way to detect Safari version -%SafariBuildToVersion = ( - '85' => '1.0', - '85.5' => '1.0', - '85.7' => '1.0.2', - '85.8' => '1.0.3', - '85.8.1' => '1.0.3', - '100' => '1.1', - '100.1' => '1.1.1', - '125.7' => '1.2.2', - '125.8' => '1.2.2', - '125.9' => '1.2.3', - '125.11' => '1.2.4', - '125.12' => '1.2.4', - '312' => '1.3', - '312.3' => '1.3.1', - '312.3.1' => '1.3.1', - '312.5' => '1.3.2', - '312.6' => '1.3.2', - '412' => '2.0', - '412.2' => '2.0', - '412.2.2' => '2.0', - '412.5' => '2.0.1', - '413' => '2.0.1', - '416.12' => '2.0.2', - '416.13' => '2.0.2', - '417.8' => '2.0.3', - '417.9.2' => '2.0.3', - '417.9.3' => '2.0.3', - '419.3' => '2.0.4', - '522.11.3' => '3.0', - '522.12' => '3.0.2', - '523.10' => '3.0.4', - '523.12' => '3.0.4', - '525.13' => '3.1', - '525.17' => '3.1.1', - '525.20' => '3.1.1', - '525.20.1' => '3.1.2', - '525.21' => '3.1.2', - '525.22' => '3.1.2', - '525.26' => '3.2', - '525.26.13' => '3.2', - '525.27' => '3.2.1', - '525.27.1' => '3.2.1', - '526.11.2' => '4.0', - '528.1' => '4.0', - '528.16' => '4.0' -); @HostAliases = @AllowAccessFromWebToFollowingAuthenticatedUsers = (); @DefaultFile = @SkipDNSLookupFor = (); @SkipHosts = @SkipUserAgents = @NotPageFiles = @SkipFiles = @SkipReferrers = (); @@ -18721,7 +18657,7 @@ if ( $UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft' ) elsif ($UserAgent =~ /$regversafari/o && $UserAgent !~ /$regnotsafari/o ) { - my $safariver = $SafariBuildToVersion{$1}; + my $safariver = $BrowsersSafariBuildToVersionHash{$1}; if ( $UserAgent =~ /$regversafariver/o ) { $safariver = $1; } diff --git a/wwwroot/cgi-bin/lib/browsers.pm b/wwwroot/cgi-bin/lib/browsers.pm index db1f7adb..aab90809 100644 --- a/wwwroot/cgi-bin/lib/browsers.pm +++ b/wwwroot/cgi-bin/lib/browsers.pm @@ -24,6 +24,17 @@ #package AWSUA; +# Relocated from main file for easier editing +%BrowsersFamily = ( + 'msie' => 1, + 'firefox' => 2, + 'netscape' => 3, + 'svn' => 4, + 'opera' => 5, + 'safari' => 6, + 'chrome' => 7, + 'konqueror' => 8 +); # BrowsersSearchIDOrder # This list is used to know in which order to search Browsers IDs (Most @@ -673,31 +684,56 @@ # Source for this is http://developer.apple.com/internet/safari/uamatrix.html %BrowsersSafariBuildToVersionHash = ( - '48' => '0.8', - '51' => '0.8.1', - '60' => '0.8.2', - '73' => '0.9', - '74' => '1.0b2', - '85' => '1.0', - '85.5' => '1.0', - '85.7' => '1.0.2', - '85.8' => '1.0.3', - '85.8.1' => '1.0.3', - '100' => '1.1', - '100.1' => '1.1.1', - '125.7' => '1.2.2', - '125.8' => '1.2.2', - '125.9' => '1.2.3', - '125.11' => '1.2.4', - '125.12' => '1.2.4', - '312' => '1.3', - '312.3' => '1.3.1', - '312.3.1' => '1.3.1', - '412' => '2.0', - '412.2' => '2.0', - '412.2.2' => '2.0', - '412.5' => '2.0.1', - '416.12' => '2.0.2' + '48' => '0.8', + '51' => '0.8.1', + '60' => '0.8.2', + '73' => '0.9', + '74' => '1.0b2', + '85' => '1.0', + '85.5' => '1.0', + '85.7' => '1.0.2', + '85.8' => '1.0.3', + '85.8.1' => '1.0.3', + '100' => '1.1', + '100.1' => '1.1.1', + '125.7' => '1.2.2', + '125.8' => '1.2.2', + '125.9' => '1.2.3', + '125.11' => '1.2.4', + '125.12' => '1.2.4', + '312' => '1.3', + '312.3' => '1.3.1', + '312.3.1' => '1.3.1', + '312.5' => '1.3.2', + '312.6' => '1.3.2', + '412' => '2.0', + '412.2' => '2.0', + '412.2.2' => '2.0', + '412.5' => '2.0.1', + '413' => '2.0.1', + '416.12' => '2.0.2', + '416.13' => '2.0.2', + '417.8' => '2.0.3', + '417.9.2' => '2.0.3', + '417.9.3' => '2.0.3', + '419.3' => '2.0.4', + '522.11.3' => '3.0', + '522.12' => '3.0.2', + '523.10' => '3.0.4', + '523.12' => '3.0.4', + '525.13' => '3.1', + '525.17' => '3.1.1', + '525.20' => '3.1.1', + '525.20.1' => '3.1.2', + '525.21' => '3.1.2', + '525.22' => '3.1.2', + '525.26' => '3.2', + '525.26.13' => '3.2', + '525.27' => '3.2.1', + '525.27.1' => '3.2.1', + '526.11.2' => '4.0', + '528.1' => '4.0', + '528.16' => '4.0' ); diff --git a/wwwroot/cgi-bin/lib/operating_systems.pm b/wwwroot/cgi-bin/lib/operating_systems.pm index 0272c441..481f7234 100644 --- a/wwwroot/cgi-bin/lib/operating_systems.pm +++ b/wwwroot/cgi-bin/lib/operating_systems.pm @@ -13,6 +13,13 @@ #package AWSOS; +# Relocated from main file for easier editing +%OSFamily = ( + 'win' => 'Windows', + 'mac' => 'Macintosh', + 'linux' => 'Linux', + 'bsd' => 'BSD' +); # OSSearchIDOrder # This list is used to know in which order to search Operating System IDs