// Fix bug on auths for sub employees #PSFV-849

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14804 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-04-23 09:38:24 +00:00
parent a8569d1496
commit 60a140c91f
7 changed files with 104 additions and 80 deletions
+18
View File
@@ -1076,6 +1076,24 @@ abstract class ObjectModelCore
return true;
}
/**
* Get the list of associated id_shop
*
* @since 1.5.0
* @return array
*/
public function getAssociatedShops()
{
if (!Shop::isTableAssociated($this->def['table']))
return array();
$list = array();
$sql = 'SELECT id_shop FROM `'._DB_PREFIX_.$this->def['table'].'_shop` WHERE `'.$this->def['primary'].'` = '.(int)$this->id;
foreach (Db::getInstance()->executeS($sql) as $row)
$list[] = $row['id_shop'];
return $list;
}
/**
* @since 1.5.0
*/