#18055781 : change RE for OMNIA (old version has an issue that old mac-book (Power PC) was recognized as a smartphone)

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6822 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2009-10-06 11:25:40 +00:00
parent e2eb092df4
commit ef387556cb

View file

@ -11,7 +11,7 @@
var $content = null;
function isFromSmartPhone() {
return Context::get('smartphone') || preg_match('/(iPopd|iPhone|PPC)/',$_SERVER['HTTP_USER_AGENT']);
return Context::get('smartphone') || preg_match('/(iPod|iPhone|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT']);
}
function haveSmartphoneModule($module) {
@ -75,9 +75,9 @@
}
function procSmartPhone($msg = null) {
if(preg_match('/(iPopd|iPhone)/',$_SERVER['HTTP_USER_AGENT'])) {
if(preg_match('/(iPod|iPhone)/',$_SERVER['HTTP_USER_AGENT'])) {
Context::addHtmlHeader('<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>');
} else if(preg_match('/PPC/',$_SERVER['HTTP_USER_AGENT'])) {
} else if(preg_match('/SCH\-M[0-9]+/',$_SERVER['HTTP_USER_AGENT'])) {
Context::addHtmlHeader('<meta name="viewport" content="width=240; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>');
}