// Context part 2

This commit is contained in:
tDidierjean
2011-07-12 12:50:00 +00:00
parent 502942002d
commit 89920e17fd
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))