Skip to content

Commit

Permalink
[-] FO : Fix bug #PSCFV-11043, bad cache id from module template
Browse files Browse the repository at this point in the history
  • Loading branch information
gRoussac committed Nov 18, 2013
1 parent 4771746 commit 22a9548
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/blocksearch/blocksearch.php
Expand Up @@ -53,6 +53,7 @@ public function install()
public function hookdisplayMobileTopSiteMap($params)
{
$this->smarty->assign(array('hook_mobile' => true, 'instantsearch' => false));
$params['hook_mobile'] = true;
return $this->hookTop($params);
}

Expand Down Expand Up @@ -80,7 +81,6 @@ public function hookLeftColumn($params)

public function hookRightColumn($params)
{

if (Tools::getValue('search_query') || !$this->isCached('blocksearch.tpl', $this->getCacheId()))
{
$this->calculHookCommon($params);
Expand All @@ -95,7 +95,8 @@ public function hookRightColumn($params)

public function hookTop($params)
{
if (Tools::getValue('search_query') || !$this->isCached('blocksearch-top.tpl', $this->getCacheId('blocksearch-top')))
$key = $this->getCacheId('blocksearch-top'.((!isset($params['hook_mobile']) || !$params['hook_mobile']) ? '' : '-hook_mobile'));
if (Tools::getValue('search_query') || !$this->isCached('blocksearch-top.tpl', $key))
{
$this->calculHookCommon($params);
$this->smarty->assign(array(
Expand All @@ -105,8 +106,8 @@ public function hookTop($params)
);

}

return $this->display(__FILE__, 'blocksearch-top.tpl', Tools::getValue('search_query') ? null : $this->getCacheId('blocksearch-top'));
d($key);
return $this->display(__FILE__, 'blocksearch-top.tpl', Tools::getValue('search_query') ? null : $key);
}

/**
Expand Down

0 comments on commit 22a9548

Please sign in to comment.