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

This commit is contained in:
Klaus Leithoff 2014-02-17 13:56:17 +00:00
parent a861f16565
commit 1c013e92f0
2 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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;