Skip to content

Commit

Permalink
Finish ie11-detection
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetx committed Nov 21, 2013
2 parents b743210 + 1d5b248 commit 12c310a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libraries/Config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ function checkClient()
)) {
$this->set('PMA_USR_BROWSER_VER', $log_version[2]);
$this->set('PMA_USR_BROWSER_AGENT', 'IE');
} elseif (preg_match(
'@Trident/(7)\.0@',
$HTTP_USER_AGENT,
$log_version
)) {
$this->set('PMA_USR_BROWSER_VER', intval($log_version[1]) + 4);
$this->set('PMA_USR_BROWSER_AGENT', 'IE');
} elseif (preg_match(
'@OmniWeb/([0-9].[0-9]{1,2})@',
$HTTP_USER_AGENT,
Expand Down
8 changes: 8 additions & 0 deletions test/classes/PMA_Config_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,14 @@ public function userAgentProvider()
'IE',
'11.0',
),
array(
'Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; '
. '.NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; '
. '.NET CLR 3.0.30729; InfoPath.3; 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',
Expand Down

0 comments on commit 12c310a

Please sign in to comment.