Treat iceweasel browser like as firefox

This commit is contained in:
Hadi Nategh 2015-03-31 14:04:48 +00:00
parent d6d2d27e9e
commit f4285fb820
2 changed files with 6 additions and 1 deletions

View File

@ -602,7 +602,7 @@ etemplate2.prototype.autocomplete_fixer = function ()
// Firefox give a security warning when transmitting to "about:blank" from a https site
// we work around that by giving existing etemplate/empty.html url
// Safari shows same warning, thought Chrome userAgent also includes Safari
if (navigator.userAgent.match(/(firefox|safari)/i) && !navigator.userAgent.match(/chrome/i))
if (navigator.userAgent.match(/(firefox|safari|iceweasel)/i) && !navigator.userAgent.match(/chrome/i))
{
jQuery(form).attr({action: egw.webserverUrl+'/etemplate/empty.html',method:'post'});
}

View File

@ -86,6 +86,11 @@ class html
self::$ua_version = preg_match('|Trident/[0-9.]+; rv:([0-9.]+)|i', $_SERVER['HTTP_USER_AGENT'], $matches) ?
$matches[1] : 11.0;
}
// iceweasel is based on mozilla and we treat it like as firefox
if (self::$user_agent == 'iceweasel')
{
self::$user_agent = 'firefox';
}
self::$ua_mobile = preg_match('/(iPhone|iPod|iPad|Android|SymbianOS|Blackberry|Kindle|Opera Mobi|Windows Phone)/i',
$_SERVER['HTTP_USER_AGENT'], $matches) ? strtolower($matches[1]) : null;