Update functions.php

A more efficient check for IE >= 11 than the previous commit
This commit is contained in:
Andrew Bauer 2014-09-13 09:47:22 -05:00
parent 91b99b97a5
commit aa3803cb0b
1 changed files with 1 additions and 1 deletions

View File

@ -784,7 +784,7 @@ function getBrowser( &$browser, &$version )
}
else
{
if (( preg_match( '/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $logVersion)) || (strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') && preg_match( '/rv:(.*?)\)/', $_SERVER['HTTP_USER_AGENT'], $logVersion)))
if (( preg_match( '/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $logVersion)) || (preg_match( '/.*Trident.*rv:(.*?)(;|\))/', $_SERVER['HTTP_USER_AGENT'], $logVersion)))
{
$version = $logVersion[1];
$browser = 'ie';