From 1c013e92f0fa21e51493bde7a69e6c05f54dcbf2 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 17 Feb 2014 13:56:17 +0000 Subject: [PATCH] IE changed its USER_AGENT string; html:: report trident; change this to msie when detected, to match the use of msie throughout egroupware; use moonocolor as fallback skin, when ie anf ff are detected --- phpgwapi/inc/class.egw_ckeditor_config.inc.php | 5 +++-- phpgwapi/inc/class.html.inc.php | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.egw_ckeditor_config.inc.php b/phpgwapi/inc/class.egw_ckeditor_config.inc.php index a907d921d9..9ee3af84cd 100644 --- a/phpgwapi/inc/class.egw_ckeditor_config.inc.php +++ b/phpgwapi/inc/class.egw_ckeditor_config.inc.php @@ -166,7 +166,7 @@ class egw_ckeditor_config { //Get the skin name $skin = $GLOBALS['egw_info']['user']['preferences']['common']['rte_skin']; - + //error_log(__METHOD__.__LINE__.' UserAgent:'.html::$user_agent); //Convert old fckeditor skin names to new ones switch ($skin) { @@ -178,7 +178,8 @@ class egw_ckeditor_config case 'kama': case 'default': $skin = "kama"; - if (html::$user_agent != 'firefox') break; + // firefox and msie fail on kama skin + if (!(html::$user_agent == 'firefox' || html::$user_agent == 'msie')) break; case 'moonocolor': $skin = "moonocolor"; break; diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 4eed1c2566..25b0fd5d63 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -69,6 +69,9 @@ class html } list(,self::$user_agent,self::$ua_version) = $parts; if ((self::$user_agent = strtolower(self::$user_agent)) == 'version') self::$user_agent = 'opera'; + // current IE may report its engine as USER_AGENT string + if (self::$user_agent=='trident') self::$user_agent='msie'; + self::$ua_mobile = preg_match('/(iPhone|iPad|Android|SymbianOS)/i',$_SERVER['HTTP_USER_AGENT']); self::$netscape4 = self::$user_agent == 'mozilla' && self::$ua_version < 5;