Permalink
Browse files

Merge branch 'mynetx/browser-detection'

  • Loading branch information...
2 parents fdb2daf + c3e8a8c commit 07855be312fc79cb51a9454b416a1fdb4528f63e J.M committed Apr 8, 2013
Showing with 32 additions and 8 deletions.
  1. +2 −2 libraries/Config.class.php
  2. +30 −6 test/classes/PMA_Config_test.php
@@ -216,9 +216,9 @@ function checkClient()
'@Mozilla/([0-9].[0-9]{1,2})@',
$HTTP_USER_AGENT,
$log_version)
- && preg_match('@Chrome/([0-9]*)@', $HTTP_USER_AGENT, $log_version2)
+ && preg_match('@Chrome/([0-9.]*)@', $HTTP_USER_AGENT, $log_version2)
) {
- $this->set('PMA_USR_BROWSER_VER', $log_version[1] . '.' . $log_version2[1]);
+ $this->set('PMA_USR_BROWSER_VER', $log_version2[1]);
$this->set('PMA_USR_BROWSER_AGENT', 'CHROME');
// newer Safari
} elseif (preg_match(
@@ -128,6 +128,30 @@ public function userAgentProvider()
'8.0',
),
array(
+ 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)',
+ 'Win',
+ 'IE',
+ '9.0',
+ ),
+ array(
+ 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0)',
+ 'Win',
+ 'IE',
+ '10.0',
+ ),
+ array(
+ 'Mozilla/5.0 (IE 11.0; Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C; rv:11.0) like Gecko',
+ 'Win',
+ 'IE',
+ '11.0',
+ ),
+ array(
+ 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',
+ 'Win',
+ 'CHROME',
+ '25.0.1364.172',
+ ),
+ array(
'Mozilla/5.0 (Unknown; U; Unix BSD/SYSV system; C -) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.10.2',
'Unix',
'SAFARI',
@@ -147,18 +171,18 @@ public function userAgentProvider()
array(
'Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0',
'Linux',
- 'MOZILLA',
+ 'FIREFOX',
'5.0',
),
- /**
- * @todo Is this version really expected?
- */
array(
'Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0',
'Linux',
- 'MOZILLA',
- '5.0',
+ 'FIREFOX',
+ '12.0',
),
+ /**
+ * @todo Is this version really expected?
+ */
array(
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.4+ (KHTML, like Gecko) Version/5.0 Safari/535.4+ SUSE/12.1 (3.2.1) Epiphany/3.2.1',
'Linux',

0 comments on commit 07855be

Please sign in to comment.