IE 11
Closed this issue · 3 comments
Yaffle commented
http://msdn.microsoft.com/en-us/library/ie/bg182625(v=vs.85).aspx
Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko
brusch commented
protected function checkBrowserInternetExplorer()
{
// Test for v1 - v1.5 IE
if (stripos($this->_agent, 'microsoft internet explorer') !== false) {
$this->setBrowser(self::BROWSER_IE);
$this->setVersion('1.0');
$aresult = stristr($this->_agent, '/');
if (preg_match('/308|425|426|474|0b1/i', $aresult)) {
$this->setVersion('1.5');
}
return true;
} // Test for versions > 1.5
else if (stripos($this->_agent, 'msie') !== false && stripos($this->_agent, 'opera') === false) {
// See if the browser is the odd MSN Explorer
if (stripos($this->_agent, 'msnb') !== false) {
$aresult = explode(' ', stristr(str_replace(';', '; ', $this->_agent), 'MSN'));
$this->setBrowser(self::BROWSER_MSN);
$this->setVersion(str_replace(array('(', ')', ';'), '', $aresult[1]));
return true;
}
$aresult = explode(' ', stristr(str_replace(';', '; ', $this->_agent), 'msie'));
$this->setBrowser(self::BROWSER_IE);
$this->setVersion(str_replace(array('(', ')', ';'), '', $aresult[1]));
return true;
} // Test for Pocket IE
else if (stripos($this->_agent, 'mspie') !== false || stripos($this->_agent, 'pocket') !== false) {
$aresult = explode(' ', stristr($this->_agent, 'mspie'));
$this->setPlatform(self::PLATFORM_WINDOWS_CE);
$this->setBrowser(self::BROWSER_POCKET_IE);
$this->setMobile(true);
if (stripos($this->_agent, 'mspie') !== false) {
$this->setVersion($aresult[1]);
} else {
$aversion = explode('/', $this->_agent);
$this->setVersion($aversion[1]);
}
return true;
} else if(stripos($this->_agent, 'trident') !== false) {
// >= IE 11
$this->setBrowser(self::BROWSER_IE);
// version
$result = explode("rv:", $this->_agent);
$this->setVersion(preg_replace("/[^0-9.]+/", "", $result[1]));
// remove Gecko out of the user-agent, otherwise the mozilla check will success
$this->_agent = str_replace(array("Mozilla", "Gecko"), "MSIE", $this->_agent);
}
return false;
}
romainneutron commented
fixed in #17