// Context part 22

This commit is contained in:
tDidierjean
2011-07-27 09:01:00 +00:00
parent 33b431647d
commit 55ee922b16
6 changed files with 50 additions and 45 deletions
+4 -4
View File
@@ -76,14 +76,14 @@ class ContactCore extends ObjectModel
* @param Context
* @return array Contacts
*/
static public function getContacts($id_lang, Context $context = null)
static public function getContacts($id_lang, Shop $shop = null)
{
if (!$context)
$context = Context::getContext();
if (!$shop)
$shop = Context::getContext()->shop;
$sql = 'SELECT *
FROM `'._DB_PREFIX_.'contact` c
'.$context->shop->sqlAsso('contact', 'c', false).'
'.$shop->sqlAsso('contact', 'c', false).'
LEFT JOIN `'._DB_PREFIX_.'contact_lang` cl ON (c.`id_contact` = cl.`id_contact`)
WHERE cl.`id_lang` = '.(int)$id_lang.'
ORDER BY `name` ASC';