// 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
+8 -12
View File
@@ -67,8 +67,6 @@ class CurrencyCore extends ObjectModel
protected $table = 'currency';
protected $identifier = 'id_currency';
/** @var Currency Current currency */
static protected $current = NULL;
/** @var array Currency cache */
static protected $currencies = array();
@@ -353,18 +351,16 @@ class CurrencyCore extends ObjectModel
}
/**
* Get current currency
*
* @deprecated use $context->currency instead
* @return Currency
*/
static public function getCurrent()
{
global $cookie;
if (!self::$current)
{
if (isset($cookie->id_currency) AND $cookie->id_currency)
self::$current = new Currency((int)($cookie->id_currency));
else
self::$current = new Currency((int)(Configuration::get('PS_CURRENCY_DEFAULT')));
}
return self::$current;
Tools::displayAsDeprecated();
return Context::getContext()->currency;
}
static public function getCurrencyInstance($id)