From 587c649517d51c0902929fa5283a75c0290b7a8f Mon Sep 17 00:00:00 2001 From: rMalie Date: Mon, 27 Feb 2012 13:29:32 +0000 Subject: [PATCH] // Fix module activation on multishop during installation #PSTEST-839 #PSTEST-877 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13623 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Module.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/classes/Module.php b/classes/Module.php index 90a310e74..201a2f224 100644 --- a/classes/Module.php +++ b/classes/Module.php @@ -217,8 +217,8 @@ abstract class ModuleCore Cache::clean('Module::isInstalled'.$this->name); - // Enable the module for all shops - $this->enable(true); + // Enable the module for current shops in context + $this->enable(); // Permissions management Db::getInstance()->execute(' @@ -525,7 +525,9 @@ abstract class ModuleCore { // Retrieve all shops where the module is enabled $list = Shop::getContextListShopID(); - $sql = 'SELECT `id_shop` FROM `'._DB_PREFIX_.'module_shop` WHERE `id_module` = '.$this->id.' '.((!$forceAll) ? 'AND `id_shop` IN('.implode(', ', $list).')' : ''); + $sql = 'SELECT `id_shop` FROM `'._DB_PREFIX_.'module_shop` + WHERE `id_module` = '.$this->id. + ((!$forceAll) ? ' AND `id_shop` IN('.implode(', ', $list).')' : ''); // Store the results in an array $items = array();