// Replace shop->sqlAsso(), shop->sqlLang() and shop->sqlRestriction() with shop->addSqlAssociation(), shop->addSqlRestrictionOnLang() and shop->addSqlRestriction()
This commit is contained in:
@@ -112,7 +112,7 @@ class AttachmentCore extends ObjectModel
|
||||
$ids_attachements[] = $attachement['id_attachment'];
|
||||
|
||||
$sql = 'SELECT * FROM `'._DB_PREFIX_.'product_attachment` pa
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pa.`id_product` = pl.`id_product`'.Context::getContext()->shop->sqlLang('pl').')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pa.`id_product` = pl.`id_product`'.Context::getContext()->shop->addSqlRestrictionOnLang('pl').')
|
||||
WHERE `id_attachment` IN ('.implode(',', array_map('intval', $ids_attachements)).')
|
||||
AND pl.`id_lang` = '.(int)$id_lang;
|
||||
$tmp = Db::getInstance()->executeS($sql);
|
||||
|
||||
Reference in New Issue
Block a user