// Blind fix

This commit is contained in:
Damien Metzger
2013-07-19 16:29:02 +02:00
parent 5646e682bc
commit 84d9caca81

View File

@@ -1354,7 +1354,7 @@ abstract class ModuleCore
elseif (isset($context->customer))
{
$groups = $context->customer->getGroups();
if (empty($groups))
if (!count($groups))
$groups = array(Configuration::get('PS_UNIDENTIFIED_GROUP'));
}
@@ -1377,7 +1377,7 @@ abstract class ModuleCore
'.(isset($billing) && $frontend ? 'AND mc.id_country = '.(int)$billing->id_country : '').'
AND (SELECT COUNT(*) FROM '._DB_PREFIX_.'module_shop ms WHERE ms.id_module = m.id_module AND ms.id_shop IN('.implode(', ', $list).')) = '.count($list).'
AND hm.id_shop IN('.implode(', ', $list).')
'.(count($groups) && $frontend ? 'AND (mg.`id_group` IN('.implode(', ', $groups).'))' : '').$paypal_condition.'
'.((count($groups) && $frontend) ? 'AND (mg.`id_group` IN ('.implode(', ', $groups).'))' : '').$paypal_condition.'
GROUP BY hm.id_hook, hm.id_module
ORDER BY hm.`position`, m.`name` DESC');
}