From 4dcf0cc3be6c338cbf1ccc3e900099ddec377fa5 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 --- 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; }