Finish ie11-detection

This commit is contained in:
J.M 2013-11-21 20:40:59 +01:00
commit 12c310ace1
2 changed files with 15 additions and 0 deletions

View File

@ -214,6 +214,13 @@ class PMA_Config
)) {
$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,

View File

@ -240,6 +240,14 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase
'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',