Fixed bug #14663: t3lib_utility_Client::getBrowserInfo returns gecko build date rathe...
authorSteffen Kamper <info@sk-typo3.de>
Wed, 9 Jun 2010 23:06:40 +0000 (23:06 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 9 Jun 2010 23:06:40 +0000 (23:06 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7859 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/utility/class.t3lib_utility_client.php

index 3b0cb16..3f5a998 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
 
 2010-06-09  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #14663: t3lib_utility_Client::getBrowserInfo returns gecko build date rather than version
        * Fixed bug #14673: Usage of debug() in BE use group *line* by default
        * Fixed bug #14674: Replace calls to t3lib_extMgm:: within t3lib_extMgm to self:: due to performance reasons (Thanks to Sebastian Michaelsen)
        * Fixed bug #14676: Replace calls to t3lib_iconWorks:: within t3lib_iconWorks to self:: due to performance reasons (Thanks to Sebastian Michaelsen)
index e4b6a5e..4eca1f5 100644 (file)
@@ -89,13 +89,19 @@ final class t3lib_utility_Client {
                                        $browserInfo['all'][$matches['browser'][$i]] = $matches['version'][$i];
                                }
                        }
+                               //Replace gecko build date with version given by rv
+                       if (isset($browserInfo['all']['gecko'])) {
+                               preg_match_all('/rv:([0-9\.]*)/', strtolower($userAgent), $version);
+                               if ($version[1][0]) {
+                                       $browserInfo['all']['gecko'] = $version[1][0];
+                               }
+                       }
                }
 
-
-               // system
+                       // system
                $browserInfo['system'] = '';
                if (strstr($userAgent, 'Win')) {
-                       // windows
+                               // windows
                        if (strstr($userAgent, 'Win98') || strstr($userAgent, 'Windows 98')) {
                                $browserInfo['system'] = 'win98';
                        } elseif (strstr($userAgent, 'Win95') || strstr($userAgent, 'Windows 95')) {