From ea8c71dfebc1187ed81ff18a5cc8ae4c4bdfb557 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Wed, 3 Oct 2012 14:52:43 +0000 Subject: [PATCH] [-] BO : fix #PSCFV-3910 --- classes/Context.php | 6 ++++++ classes/controller/FrontController.php | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/classes/Context.php b/classes/Context.php index 8f4c35fab..cc0a564d2 100644 --- a/classes/Context.php +++ b/classes/Context.php @@ -137,6 +137,12 @@ class ContextCore protected function checkMobileContext() { + // Check mobile context + if (Tools::isSubmit('no_mobile_theme')) + Context::getContext()->cookie->no_mobile = true; + else if (Tools::isSubmit('mobile_theme_ok')) + Context::getContext()->cookie->no_mobile = false; + return isset($_SERVER['HTTP_USER_AGENT']) && isset(Context::getContext()->cookie) && (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE') diff --git a/classes/controller/FrontController.php b/classes/controller/FrontController.php index b34fe517c..b85a22066 100755 --- a/classes/controller/FrontController.php +++ b/classes/controller/FrontController.php @@ -252,12 +252,6 @@ class FrontControllerCore extends Controller CartRule::autoAddToCart($this->context); } - // Check mobile context - if (Tools::isSubmit('no_mobile_theme')) - $this->context->cookie->no_mobile = true; - else if (Tools::isSubmit('mobile_theme_ok')) - $this->context->cookie->no_mobile = false; - $locale = strtolower(Configuration::get('PS_LOCALE_LANGUAGE')).'_'.strtoupper(Configuration::get('PS_LOCALE_COUNTRY').'.UTF-8'); setlocale(LC_COLLATE, $locale); setlocale(LC_CTYPE, $locale);