From 3b07a2f513b82b5321e23f71cedc209d5fbf3713 Mon Sep 17 00:00:00 2001 From: ngleader Date: Tue, 8 Mar 2011 06:05:41 +0000 Subject: [PATCH] =?UTF-8?q?#19014866=20=EB=AA=A8=EB=B0=94=EC=9D=BC?= =?UTF-8?q?=EC=97=90=EC=84=9C=20PC=EB=B7=B0=20=EC=9C=A0=EC=A7=80=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8149 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/mobile/Mobile.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/classes/mobile/Mobile.class.php b/classes/mobile/Mobile.class.php index eef9d43e7..e1c254f13 100644 --- a/classes/mobile/Mobile.class.php +++ b/classes/mobile/Mobile.class.php @@ -25,14 +25,21 @@ class Mobile { { $m = Context::get('m'); if($m == "1") { + $_COOKIE["mobile"] = true; setcookie("mobile", true); $this->ismobile = true; } else if($m === "0") { - setcookie("mobile", ""); + $_COOKIE["mobile"] = false; + setcookie("mobile", false); $this->ismobile = false; } - else if($_COOKIE["mobile"]) $this->ismobile = true; + else if($_COOKIE["mobile"] == true) { + $this->ismobile = true; + } + else if($_COOKIE["mobile"] == false) { + $this->ismobile = false; + } else { if(preg_match('/(iPod|iPhone|Android|BlackBerry|SymbianOS|SCH\-M[0-9]+)/',$_SERVER['HTTP_USER_AGENT'])) {