// Context part 2

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7598 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-12 12:50:00 +00:00
parent 39d0acc30b
commit 25b1bceffd
21 changed files with 221 additions and 230 deletions
+3 -9
View File
@@ -280,21 +280,15 @@ class CountryCore extends ObjectModel
/**
* Returns the default country Id
*
* @deprecated use $context->country->id instead
* @return integer default country id
*/
public static function getDefaultCountryId()
{
global $cookie;
if (Configuration::get('PS_GEOLOCATION_ENABLED') AND Validate::isLanguageIsoCode($cookie->iso_code_country))
$id_country = (int)Country::getByIso($cookie->iso_code_country);
else
$id_country = (int)Configuration::get('PS_COUNTRY_DEFAULT');
return $id_country;
Tools::displayAsDeprecated();
return Context::getContext()->country->id;
}
public static function getCountriesByZoneId($id_zone, $id_lang, $id_shop = false)
{
if (empty($id_zone) OR empty($id_lang))