From d0b5e395f3d3abc37381c785d1906b47f59fddb0 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Fri, 7 Sep 2012 12:43:44 +0000 Subject: [PATCH] // Small fix for mobile theme git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17235 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Context.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/classes/Context.php b/classes/Context.php index 38962c4e4..d418492f6 100644 --- a/classes/Context.php +++ b/classes/Context.php @@ -121,7 +121,6 @@ class ContextCore $this->mobile_device = false; if ($this->checkMobileContext()) { - switch ((int)Configuration::get('PS_ALLOW_MOBILE_DEVICE')) { case 1: // Only for mobile device @@ -145,9 +144,9 @@ class ContextCore protected function checkMobileContext() { - return file_exists(_PS_THEME_MOBILE_DIR_) + return isset($_SERVER['HTTP_USER_AGENT']) && (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE') - && isset($_SERVER['HTTP_USER_AGENT']) + && @filemtime(_PS_THEME_MOBILE_DIR_) && !Context::getContext()->cookie->no_mobile; }