#19014866 모바일에서 PC뷰 유지 버그 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8149 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2011-03-08 06:05:41 +00:00
parent 3278b32ed6
commit 3b07a2f513

View file

@ -25,14 +25,21 @@ class Mobile {
{ {
$m = Context::get('m'); $m = Context::get('m');
if($m == "1") { if($m == "1") {
$_COOKIE["mobile"] = true;
setcookie("mobile", true); setcookie("mobile", true);
$this->ismobile = true; $this->ismobile = true;
} }
else if($m === "0") { else if($m === "0") {
setcookie("mobile", ""); $_COOKIE["mobile"] = false;
setcookie("mobile", false);
$this->ismobile = false;
}
else if($_COOKIE["mobile"] == true) {
$this->ismobile = true;
}
else if($_COOKIE["mobile"] == false) {
$this->ismobile = false; $this->ismobile = false;
} }
else if($_COOKIE["mobile"]) $this->ismobile = true;
else { else {
if(preg_match('/(iPod|iPhone|Android|BlackBerry|SymbianOS|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT'])) if(preg_match('/(iPod|iPhone|Android|BlackBerry|SymbianOS|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT']))
{ {