From 3e9f628003b39bbb6eeeaa28b20a86c11b4432dd Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 25 Oct 2013 15:12:46 +0200 Subject: [PATCH] Fix #1549 : recognize IE11 --- lib/classes/Browser.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/classes/Browser.php b/lib/classes/Browser.php index 129990b910..317276b3b1 100644 --- a/lib/classes/Browser.php +++ b/lib/classes/Browser.php @@ -737,6 +737,16 @@ class Browser } 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;