From 3d85e81c3db3503a5ba65bd1bd54454c10b2e55e Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Fri, 28 Jun 2013 18:51:49 +0200 Subject: [PATCH] // Oops, removing a block is a sure way to optimize... --- modules/blocknewproducts/blocknewproducts.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/blocknewproducts/blocknewproducts.php b/modules/blocknewproducts/blocknewproducts.php index 4fa329db7..12659bc83 100644 --- a/modules/blocknewproducts/blocknewproducts.php +++ b/modules/blocknewproducts/blocknewproducts.php @@ -109,12 +109,9 @@ class BlockNewProducts extends Module public function hookRightColumn($params) { - if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY')) - return; - if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId())) { - if (!($newProducts = Product::getNewProducts((int)($params['cookie']->id_lang), 0, (int)Configuration::get('NEW_PRODUCTS_NBR')))) + if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY') && !($newProducts = Product::getNewProducts((int)$params['cookie']->id_lang, 0, (int)Configuration::get('NEW_PRODUCTS_NBR')))) return; $this->smarty->assign(array(