[-] BO : BugFix : #PSCFV-2798 : Multistore : BUG on the "modify products page" with another shop device

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16010 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vChabot
2012-06-13 13:23:52 +00:00
parent fa866d7057
commit 021272870f
6 changed files with 47 additions and 8 deletions
+17
View File
@@ -991,4 +991,21 @@ class ShopCore extends ObjectModel
Tools::displayAsDeprecated();
return Context::getContext()->shop->id;
}
/**
* @param string $entity
* @param int $id_shop
* @return array|bool
*/
public static function getEntityIds($entity, $id_shop)
{
if (!Shop::isTableAssociated($entity))
return false;
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT `id_'.pSQL($entity).'`
FROM `'._DB_PREFIX_.pSQL($entity).'_shop`
WHERE `id_shop` = '.(int)$id_shop
);
}
}