Merge pull request #1114 from victorsl/BUG-10199

BUG 10199 "Error en IE 8, por problema de compatibilidad" SOLVED
This commit is contained in:
julceslauhub
2012-12-18 12:29:03 -08:00

View File

@@ -259,34 +259,36 @@ class SkinEngine
$template->assign('styles', $styles); $template->assign('styles', $styles);
$template->assign('bodyTemplate', $body); $template->assign('bodyTemplate', $body);
// verify is RTL $doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
$oServerConf =& serverConf::getSingleton(); $meta = null;
if ($oServerConf->isRtl(SYS_LANG)) { $dirBody = null;
$template->assign('dirBody', 'dir="RTL"');
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 = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=$ie\" />";
}
} }
// end verify
// verify is IE $serverConf = &serverConf::getSingleton();
$doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
$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]+)'
);
foreach ($iexplores as $browser => $pattern) { if ($serverConf->isRtl(SYS_LANG)) {
if (preg_match('/'.$pattern.'/', $_SERVER['HTTP_USER_AGENT'])) { $dirBody = "dir=\"RTL\"";
$doctype = '';
$meta = '<meta http-equiv="X-UA-Compatible" content="'. $browser .'"/>';
}
} }
// 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(); echo $template->getOutputContent();
} }
@@ -718,4 +720,3 @@ class SkinEngine
} }