// Fix some bugs on multishop

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8145 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-22 13:44:20 +00:00
parent 60e357bd4b
commit 93b9a835d4
3 changed files with 16 additions and 12 deletions
+4 -2
View File
@@ -641,6 +641,8 @@ class ShopCore extends ObjectModel
{
if ($shopID || $shopGroupID)
$restriction = ' AND '.$alias.'id_shop IN ('.implode(', ', $this->getListOfID($share)).') ';
else if ($share == Shop::SHARE_STOCK)
$restriction = ' AND '.$alias.'id_shop = '.$this->getID(true);
}
return $restriction;
@@ -678,9 +680,9 @@ class ShopCore extends ObjectModel
* @param Context $context
* @return string
*/
public function sqlLang($alias)
public function sqlLang($alias = null)
{
return ' AND '.$alias.'.id_shop = '.$this->getID(true). ' ';
return ' AND '.(($alias) ? $alias.'.' : '').'id_shop = '.$this->getID(true). ' ';
}
/**