From f4285fb820217ab09a1f86c4f3b970354def7154 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 31 Mar 2015 14:04:48 +0000 Subject: [PATCH] Treat iceweasel browser like as firefox --- etemplate/js/etemplate2.js | 2 +- phpgwapi/inc/class.html.inc.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index e72ba72f3f..b4fde84c80 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -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'}); } diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 11770ad5b1..be1ad71cd5 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -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;