Merge pull request #1 from PrestaEdit/mobile

[-] FO : show mobile theme if you have click "Broswe the mobile site" on...
This commit is contained in:
PrestaEdit committed 2012-11-29 13:01:22 -08:00
commit 1286cd3a89
1 file changed
+5
+5
View File
@@ -110,6 +110,10 @@ class ContextCore
{ {
$this->mobile_device = false; $this->mobile_device = false;
if ($this->checkMobileContext()) if ($this->checkMobileContext())
{
if(Context::getContext()->cookie->no_mobile == false AND (int)Configuration::get('PS_ALLOW_MOBILE_DEVICE') != 0)
$this->mobile_device = true;
else
{ {
require_once(_PS_TOOL_DIR_.'mobile_Detect/Mobile_Detect.php'); require_once(_PS_TOOL_DIR_.'mobile_Detect/Mobile_Detect.php');
$this->mobile_detect = new Mobile_Detect(); $this->mobile_detect = new Mobile_Detect();
@@ -130,6 +134,7 @@ class ContextCore
} }
} }
} }
}
return $this->mobile_device; return $this->mobile_device;
} }