update
This commit is contained in:
38
modules/pagecache/upgrade/Upgrade-7.4.0.php
Normal file
38
modules/pagecache/upgrade/Upgrade-7.4.0.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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;}
|
||||
|
||||
/**
|
||||
* @var $module Jprestaspeedpack
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
function upgrade_module_7_4_0($module)
|
||||
{
|
||||
$ret = true;
|
||||
if (Tools::version_compare(_PS_VERSION_, '1.7', '>')) {
|
||||
$ret = $module->addOverride('Media');
|
||||
}
|
||||
|
||||
$module->registerHook('actionTaxManager');
|
||||
|
||||
// Do not add CSS and JS version in the cache key if Media was correctly overriden
|
||||
Configuration::updateValue('pagecache_depend_on_css_js', !$ret);
|
||||
|
||||
Configuration::deleteByName('pagecache_key_tax_country');
|
||||
Configuration::deleteByName('pagecache_key_tax_state');
|
||||
Configuration::deleteByName('pagecache_key_tax_postcode');
|
||||
|
||||
if ($ret) {
|
||||
$module->clearCacheAndStats('Upgrade 7.4.0');
|
||||
}
|
||||
|
||||
return (bool)$ret;
|
||||
}
|
||||
Reference in New Issue
Block a user