diff --git a/admin-dev/themes/default/template/controllers/modules/list.tpl b/admin-dev/themes/default/template/controllers/modules/list.tpl index 857df1729..334753ce2 100644 --- a/admin-dev/themes/default/template/controllers/modules/list.tpl +++ b/admin-dev/themes/default/template/controllers/modules/list.tpl @@ -24,6 +24,8 @@ * International Registered Trademark & Property of PrestaShop SA *} + {if count($modules)} + @@ -74,11 +76,10 @@ @@ -86,10 +87,11 @@
- {if count($modules)} -
- - -
- {/if} +
+ + +
+ {else} +

{l s='No modules available on this section.'}

+ {/if} diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index bbb5188a5..2ecf2fa58 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -867,25 +867,25 @@ class AdminModulesControllerCore extends AdminController // Filter on favorites if (Configuration::get('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee) == 'favorites') { - if ((int)Db::getInstance()->getValue('SELECT `id_module_preference` FROM `'._DB_PREFIX_.'module_preference` WHERE `module` = \''.pSQL($module->name).'\' AND `id_employee` = '.(int)$this->id_employee.' AND `favorite` = 1 AND (`interest` = 1 OR `interest` IS NULL)') > 0) - return false; - return true; + if ((int)Db::getInstance()->getValue('SELECT `id_module_preference` FROM `'._DB_PREFIX_.'module_preference` WHERE `module` = \''.pSQL($module->name).'\' AND `id_employee` = '.(int)$this->id_employee.' AND `favorite` = 1 AND (`interest` = 1 OR `interest` IS NULL)') < 1) + return true; } + else + { + // Handle "others" category + if (!isset($this->list_modules_categories[$module->tab])) + $module->tab = 'others'; - - // Handle "others" category - if (!isset($this->list_modules_categories[$module->tab])) - $module->tab = 'others'; - - // Filter on module category - $categoryFiltered = array(); - $filterCategories = explode('|', Configuration::get('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee)); - if (count($filterCategories) > 0) - foreach ($filterCategories as $fc) - if (!empty($fc)) - $categoryFiltered[$fc] = 1; - if (count($categoryFiltered) > 0 && !isset($categoryFiltered[$module->tab])) - return true; + // Filter on module category + $categoryFiltered = array(); + $filterCategories = explode('|', Configuration::get('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee)); + if (count($filterCategories) > 0) + foreach ($filterCategories as $fc) + if (!empty($fc)) + $categoryFiltered[$fc] = 1; + if (count($categoryFiltered) > 0 && !isset($categoryFiltered[$module->tab])) + return true; + } // Filter on module type and author