Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development

This commit is contained in:
Jerome Nadaud committed 2013-10-30 16:48:26 +01:00
commit da43700361
6 files changed
+39 -27

No files matched your search

+12
View File
@@ -1593,6 +1593,18 @@ abstract class ModuleCore
return Cache::retrieve('Module::isInstalled'.$module_name);
}
public function isEnabledForShopContext()
{
$shop_list = Shop::getContextListShopID();
return (bool)Db::getInstance()->getValue('
SELECT COUNT(*) n
FROM `'._DB_PREFIX_.'module_shop`
WHERE id_module='.(int)$this->id.' AND id_shop IN ('.implode(',', array_map('intval', Shop::getContextListShopID())).')
GROUP BY id_module
HAVING n='.(int)count(Shop::getContextListShopID())
);
}
public static function isEnabled($module_name)
{
if (!Cache::isStored('Module::isEnabled'.$module_name))