// 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:
+8
-12
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user