// Replace shop->addSqlRestriction() and shop->addSqlRestrictionOnLang() by static versions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13618 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+3
-6
@@ -93,16 +93,13 @@ class MetaCore extends ObjectModel
|
||||
ORDER BY page ASC');
|
||||
}
|
||||
|
||||
public static function getMetasByIdLang($id_lang, Shop $shop = null)
|
||||
public static function getMetasByIdLang($id_lang)
|
||||
{
|
||||
if (!$shop)
|
||||
$shop = Context::getContext()->shop;
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM `'._DB_PREFIX_.'meta` m
|
||||
LEFT JOIN `'._DB_PREFIX_.'meta_lang` ml ON m.`id_meta` = ml.`id_meta`
|
||||
WHERE ml.`id_lang` = '.(int)$id_lang
|
||||
.$shop->addSqlRestrictionOnLang('ml').
|
||||
.Shop::addSqlRestrictionOnLang('ml').
|
||||
'ORDER BY page ASC';
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
|
||||
@@ -118,7 +115,7 @@ class MetaCore extends ObjectModel
|
||||
LEFT JOIN '._DB_PREFIX_.'meta_lang ml on (m.id_meta = ml.id_meta)
|
||||
WHERE m.page = \''.pSQL($page).'\'
|
||||
AND ml.id_lang = '.(int)$id_lang
|
||||
.$context->shop->addSqlRestrictionOnLang('ml');
|
||||
.Shop::addSqlRestrictionOnLang('ml');
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user