// Replace shop->sqlAsso(), shop->sqlLang() and shop->sqlRestriction() with shop->addSqlAssociation(), shop->addSqlRestrictionOnLang() and shop->addSqlRestriction()

This commit is contained in:
rMalie
2011-10-17 09:46:08 +00:00
parent b0be0dd5ab
commit e6f45e54a6
60 changed files with 205 additions and 197 deletions
+3 -3
View File
@@ -254,7 +254,7 @@ class ProductComment extends ObjectModel
SELECT pc.`id_product_comment`, pc.`id_product`, IF(c.id_customer, CONCAT(c.`firstname`, \' \', c.`lastname`), pc.customer_name) customer_name, pc.`content`, pc.`grade`, pc.`date_add`, pl.`name`
FROM `'._DB_PREFIX_.'product_comment` pc
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = pc.`id_customer`)
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Context::getContext()->shop->sqlLang('pl').')
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Context::getContext()->shop->addSqlRestrictionOnLang('pl').')
WHERE pc.`validate` = '.(int)$validate.'
ORDER BY pc.`date_add` DESC'));
}
@@ -270,7 +270,7 @@ class ProductComment extends ObjectModel
SELECT pc.`id_product_comment`, pc.`id_product`, IF(c.id_customer, CONCAT(c.`firstname`, \' \', c.`lastname`), pc.customer_name) customer_name, pc.`content`, pc.`grade`, pc.`date_add`, pl.`name`
FROM `'._DB_PREFIX_.'product_comment` pc
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = pc.`id_customer`)
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Context::getContext()->shop->sqlLang('pl').')
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Context::getContext()->shop->addSqlRestrictionOnLang('pl').')
ORDER BY pc.`date_add` DESC'));
}
@@ -397,7 +397,7 @@ class ProductComment extends ObjectModel
LEFT JOIN `'._DB_PREFIX_.'product_comment` pc
ON pcr.id_product_comment = pc.id_product_comment
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = pc.`id_customer`)
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.' AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Context::getContext()->shop->sqlLang('pl').')
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = pc.`id_product` AND pl.`id_lang` = '.(int)Context::getContext()->language->id.' AND pl.`id_lang` = '.(int)Context::getContext()->language->id.Context::getContext()->shop->addSqlRestrictionOnLang('pl').')
ORDER BY pc.`date_add` DESC');
}