Follow-up to issue #14662: htmlArea RTE: Should use t3lib_utility_Client::getBrowserInfo
authorStanislas Rolland <typo3@sjbr.ca>
Thu, 10 Jun 2010 01:15:40 +0000 (01:15 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Thu, 10 Jun 2010 01:15:40 +0000 (01:15 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7861 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php

index d377d3e..cf66fe6 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-06-09  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #14677: htmlArea RTE: Toolbar state incorect in the absence of block element
+       * Follow-up to issue #14662: htmlArea RTE: Should use t3lib_utility_Client::getBrowserInfo
 
 2010-06-09  Steffen Kamper  <info@sk-typo3.de>
 
index 0c4637b..cf0e82f 100644 (file)
@@ -1,6 +1,7 @@
 2010-06-09  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #14677: htmlArea RTE: Toolbar state incorect in the absence of block element
+       * Follow-up to issue #14662: htmlArea RTE: Should use t3lib_utility_Client::getBrowserInfo
 
 2010-06-08  Stanislas Rolland  <typo3@sjbr.ca>
 
index 0828b4a..fd1ef3e 100644 (file)
@@ -1392,23 +1392,13 @@ class tx_rtehtmlarea_base extends t3lib_rteapi {
                        $userAgent = t3lib_div::getIndpEnv('HTTP_USER_AGENT');
                }
                $browserInfo = t3lib_utility_Client::getBrowserInfo($userAgent);
-                       // Known engines: order is not irrelevant.
+                       // Known engines: order is not irrelevant!
                $knownEngines = array('opera', 'msie', 'gecko', 'webkit');
                if (is_array($browserInfo['all'])) {
                        foreach ($knownEngines as $engine) {
                                if ($browserInfo['all'][$engine]) {
                                        $browserInfo['browser'] = $engine;
-                                       switch ($engine) {
-                                               case 'gecko':
-                                                               // We need the Gecko revision number as version of the Gecko engine, not the build date
-                                                       $tmp = strstr($browserInfo['useragent'], 'rv:');
-                                                       $browserInfo['version'] = t3lib_utility_Client::getVersion(substr($tmp, 3));
-                                               break;
-                                               default:
-                                                       $browserInfo['version'] = t3lib_utility_Client::getVersion($browserInfo['all'][$engine]);
-                                               break;
-                                       }
-                                       break;
+                                       $browserInfo['version'] = t3lib_utility_Client::getVersion($browserInfo['all'][$engine]);
                                }
                        }
                }