// Improve multishop code

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10982 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-12-06 14:08:48 +00:00
parent 5b9e12bba1
commit 1172e7a8d0
4 changed files with 29 additions and 15 deletions
+10 -5
View File
@@ -80,13 +80,18 @@ class ShopUrlCore extends ObjectModel
return $url.$this->physical_uri.$this->virtual_uri;
}
/**
* Get list of shop urls
*
* @param bool $id_shop
* @return Collection
*/
public static function getShopUrls($id_shop = false)
{
$sql = 'SELECT *
FROM '._DB_PREFIX_.'shop_url
WHERE 1
'.($id_shop ? ' AND id_shop = '.(int)$id_shop : '');
return Db::getInstance()->executeS($sql);
$urls = new Collection('ShopUrl');
if ($id_shop)
$urls->where('id_shop = '.(int)$id_shop);
return $urls;
}
public function setMain()