diff --git a/workflow/engine/skinEngine/skinEngine.php b/workflow/engine/skinEngine/skinEngine.php index a5f59f44b..1772457aa 100755 --- a/workflow/engine/skinEngine/skinEngine.php +++ b/workflow/engine/skinEngine/skinEngine.php @@ -259,34 +259,36 @@ class SkinEngine $template->assign('styles', $styles); $template->assign('bodyTemplate', $body); - // verify is RTL - $oServerConf =& serverConf::getSingleton(); - if ($oServerConf->isRtl(SYS_LANG)) { - $template->assign('dirBody', 'dir="RTL"'); + $doctype = ""; + $meta = null; + $dirBody = null; + + if (preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) { + $ie = intval($arrayMatch[1]); + $swTrident = (preg_match("/^.*Trident.*$/", $_SERVER["HTTP_USER_AGENT"]))? 1 : 0; //Trident only in IE8+ + + $sw = 1; + + if ((($ie == 7 && $swTrident == 1) || $ie == 8) && !preg_match("/^ux.+$/", SYS_SKIN)) { //IE8 + $sw = 0; + } + + if ($sw == 1) { + $doctype = null; + $meta = ""; + } } - // end verify - // verify is IE - $doctype = ''; - $meta = ''; - $iexplores = array( - 'IE=10' => '(MSIE 10\.[0-9]+)', - 'IE=9' => '(MSIE 9\.[0-9]+)', - 'IE=8' => '(MSIE 8\.[0-9]+)', - 'IE=7' => '(MSIE 7\.[0-9]+)', - 'IE=6' => '(MSIE 6\.[0-9]+)' - ); + $serverConf = &serverConf::getSingleton(); - foreach ($iexplores as $browser => $pattern) { - if (preg_match('/'.$pattern.'/', $_SERVER['HTTP_USER_AGENT'])) { - $doctype = ''; - $meta = ''; - } + if ($serverConf->isRtl(SYS_LANG)) { + $dirBody = "dir=\"RTL\""; } - // end verify - $template->assign('meta', $meta); - $template->assign('doctype', $doctype); + $template->assign("doctype", $doctype); + $template->assign("meta", $meta); + $template->assign("dirBody", $dirBody); + echo $template->getOutputContent(); } @@ -718,4 +720,3 @@ class SkinEngine } -