// Fix module activation on multishop during installation #PSTEST-839 #PSTEST-877
This commit is contained in:
+5
-3
@@ -217,8 +217,8 @@ abstract class ModuleCore
|
|||||||
|
|
||||||
Cache::clean('Module::isInstalled'.$this->name);
|
Cache::clean('Module::isInstalled'.$this->name);
|
||||||
|
|
||||||
// Enable the module for all shops
|
// Enable the module for current shops in context
|
||||||
$this->enable(true);
|
$this->enable();
|
||||||
|
|
||||||
// Permissions management
|
// Permissions management
|
||||||
Db::getInstance()->execute('
|
Db::getInstance()->execute('
|
||||||
@@ -525,7 +525,9 @@ abstract class ModuleCore
|
|||||||
{
|
{
|
||||||
// Retrieve all shops where the module is enabled
|
// Retrieve all shops where the module is enabled
|
||||||
$list = Shop::getContextListShopID();
|
$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
|
// Store the results in an array
|
||||||
$items = array();
|
$items = array();
|
||||||
|
|||||||
Reference in New Issue
Block a user