// Context part 22

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7753 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-27 09:01:00 +00:00
parent 3557765c59
commit 86fd2a4648
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';