36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
|
|
*
|
|
* @author Jpresta
|
|
* @copyright Jpresta
|
|
* @license See the license of this module in file LICENSE.txt, thank you.
|
|
*/
|
|
if (!defined('_PS_VERSION_')) {exit;}
|
|
class Context extends ContextCore
|
|
{
|
|
/*
|
|
* module: pagecache
|
|
* date: 2025-11-28 11:17:30
|
|
* version: 9.6.1
|
|
*/
|
|
public function getMobileDetect()
|
|
{
|
|
if ($this->mobile_detect === null) {
|
|
if (!Module::isEnabled('pagecache') || !file_exists(_PS_MODULE_DIR_ . 'pagecache/pagecache.php')) {
|
|
return parent::getMobileDetect();
|
|
} else {
|
|
require_once _PS_MODULE_DIR_ . 'pagecache/pagecache.php';
|
|
if ($this->mobile_detect === null) {
|
|
if (PageCache::isCacheWarmer()) {
|
|
$this->mobile_detect = new JprestaUtilsMobileDetect();
|
|
} else {
|
|
return parent::getMobileDetect();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return $this->mobile_detect;
|
|
}
|
|
}
|