Treat iceweasel browser like as firefox

This commit is contained in:
Hadi Nategh 2015-03-31 13:55:05 +00:00
parent c5ddcdfcf9
commit 5026216842
2 changed files with 6 additions and 1 deletions

View File

@ -198,7 +198,7 @@ class etemplate_new extends etemplate_widget_template
// set action attribute for autocomplete form tag
// as firefox complains on about:balnk action, thus we have to literaly submit the form to a blank html
$form_action = "about:blank";
if (html::$user_agent == 'firefox' || html::$user_agent =='iceweasel') $form_action = $GLOBALS['egw_info']['server']['webserver_url'].'/etemplate/empty.html';
if (html::$user_agent == 'firefox') $form_action = $GLOBALS['egw_info']['server']['webserver_url'].'/etemplate/empty.html';
// check if we are in an ajax-exec call from jdots template (or future other tabbed templates)
if (isset($GLOBALS['egw']->framework->response))

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;