From 4d3fc8c314f8fa117ee8c017c1ef57ab2e23cd13 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Wed, 21 Aug 2013 15:13:35 +0200 Subject: [PATCH] [-] MO : fixed smarty cache on blocksearch #PSCFV-8739 --- modules/blocksearch/blocksearch.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/blocksearch/blocksearch.php b/modules/blocksearch/blocksearch.php index 48d1a70c1..0d8ffbb8a 100644 --- a/modules/blocksearch/blocksearch.php +++ b/modules/blocksearch/blocksearch.php @@ -80,23 +80,24 @@ public function hookDisplayMobileHeader($params) public function hookRightColumn($params) { - if (!$this->isCached('blocksearch.tpl', $this->getCacheId())) + + if (Tools::getValue('search_query') || !$this->isCached('blocksearch.tpl', $this->getCacheId())) { $this->calculHookCommon($params); $this->smarty->assign('blocksearch_type', 'block'); } - return $this->display(__FILE__, 'blocksearch.tpl', $this->getCacheId()); + return $this->display(__FILE__, 'blocksearch.tpl', Tools::getValue('search_query') ? null : $this->getCacheId()); } public function hookTop($params) { - if (!$this->isCached('blocksearch-top.tpl', $this->getCacheId('blocksearch-top'))) + if (Tools::getValue('search_query') || !$this->isCached('blocksearch-top.tpl', $this->getCacheId('blocksearch-top'))) { $this->calculHookCommon($params); $this->smarty->assign('blocksearch_type', 'top'); } - return $this->display(__FILE__, 'blocksearch-top.tpl', $this->getCacheId('blocksearch-top')); + return $this->display(__FILE__, 'blocksearch-top.tpl', Tools::getValue('search_query') ? null : $this->getCacheId('blocksearch-top')); } /**