]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Moved Safari browser info and browser families to browsers.pm and os families to...
authormanolamancha <>
Mon, 17 May 2010 12:35:58 +0000 (12:35 +0000)
committermanolamancha <>
Mon, 17 May 2010 12:35:58 +0000 (12:35 +0000)
wwwroot/cgi-bin/awstats.pl
wwwroot/cgi-bin/lib/browsers.pm
wwwroot/cgi-bin/lib/operating_systems.pm

index ff5b93b15fc00b54e2bf60e540257a068ade165c..5c4475e61b6786f1be4a0a297f00a86987104b9e 100644 (file)
@@ -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;
                                                        }
index db1f7adbfb1a94c46744963db4f2486058312a91..aab9080937e1f4928850522d042aaa4cfac2113c 100644 (file)
                
 #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
 # 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'
 );
 
 
index 0272c441a4750c31cd8e5f7376b9dc2ff16aa57b..481f72342bc3a47871cad228fbbec8eff85ee7fd 100644 (file)
 
 #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