From e138fd239e616503dbbb917edca88d74bd8aaca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Tue, 8 Jan 2013 10:23:01 +0100 Subject: [PATCH] [*] MO: Add smarty cache on blockcustomerprivacy --- modules/blockcustomerprivacy/blockcustomerprivacy.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/blockcustomerprivacy/blockcustomerprivacy.php b/modules/blockcustomerprivacy/blockcustomerprivacy.php index 4899f4ccd..102723ccf 100644 --- a/modules/blockcustomerprivacy/blockcustomerprivacy.php +++ b/modules/blockcustomerprivacy/blockcustomerprivacy.php @@ -19,7 +19,7 @@ * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA -* @copyright 2007-2013 PrestaShop SA +* @copyright 2007-2013 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ @@ -73,6 +73,7 @@ class Blockcustomerprivacy extends Module $message_trads[(int)$id_lang[1]] = $value; } Configuration::updateValue('CUSTPRIV_MESSAGE', $message_trads, true); + $this->_clearCache('blockcustomerprivacy.tpl'); $output = '
'.$this->l('Configuration updated').'
'; } @@ -187,9 +188,9 @@ class Blockcustomerprivacy extends Module { if (!$this->checkConfig()) return; + if (!$this->isCached('blockcustomerprivacy.tpl', $this->getCacheId())) + $this->smarty->assign('privacy_message', Configuration::get('CUSTPRIV_MESSAGE', $this->context->language->id)); - $this->smarty->assign('privacy_message', Configuration::get('CUSTPRIV_MESSAGE', $this->context->language->id)); - - return $this->display(__FILE__, 'blockcustomerprivacy.tpl'); + return $this->display(__FILE__, 'blockcustomerprivacy.tpl', $this->getCacheId()); } -} \ No newline at end of file +}