[-] WS : Fix 1.5 compatibility

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17140 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aKorczak
2012-08-31 16:04:18 +00:00
parent 8b77d82ca9
commit 2ffab71fc2

View File

@@ -1035,12 +1035,7 @@ abstract class ObjectModelCore
$multi_shop_join = ' LEFT JOIN `'._DB_PREFIX_.bqSQL($this->def['table']).'_'.bqSQL($assoc['type']).'`
AS `multi_shop_'.bqSQL($this->def['table']).'`
ON (main.`'.bqSQL($this->def['primary']).'` = `multi_shop_'.bqSQL($this->def['table']).'`.`'.bqSQL($this->def['primary']).'`)';
foreach ($vars['shopIDs'] as $id_shop)
$or[] = ' `multi_shop_'.bqSQL($this->def['table']).'`.id_shop = '.(int)$id_shop.' ';
$prepend = '';
if (count($or))
$prepend = 'AND ('.implode('OR', $or).')';
$sql_filter = $prepend.$sql_filter;
$sql_filter = 'AND id_shop = '.Context::getContext()->shop->id.' '.$sql_filter;
$sql_join = $multi_shop_join.' '.$sql_join;
}
else