MDL-31482 Lib: IE8/IE7 (even with stupid user agent) should not be 'legacy' device type

This commit is contained in:
sam marshall 2012-02-02 13:49:35 +00:00
parent baa5cd8240
commit edcf82d5a3
2 changed files with 11 additions and 1 deletions

View file

@ -8273,7 +8273,8 @@ function get_device_type() {
return 'tablet';
}
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') !== false) {
// Safe way to check for IE6 and not get false positives for some IE 7/8 users
if (substr($_SERVER['HTTP_USER_AGENT'], 0, 34) === 'Mozilla/4.0 (compatible; MSIE 6.0;') {
return 'legacy';
}