diff options
author | sgiehl <stefan@piwik.org> | 2015-10-15 22:06:48 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-10-15 23:26:38 +0300 |
commit | ccefdb1d5451133709edcc468577de39a343c00a (patch) | |
tree | 49053827ef60f141f5dd262d76d4180425ed22e4 /core/Metrics | |
parent | 5b64e37e82cab28cac0998910dccefd73668400e (diff) |
use number format for currency in all websites dashboard
Diffstat (limited to 'core/Metrics')
-rw-r--r-- | core/Metrics/Formatter.php | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/core/Metrics/Formatter.php b/core/Metrics/Formatter.php index 8fbe5cbb89..077646ba00 100644 --- a/core/Metrics/Formatter.php +++ b/core/Metrics/Formatter.php @@ -150,7 +150,7 @@ class Formatter public function getPrettyMoney($value, $idSite) { $space = ' '; - $currencySymbol = self::getCurrencySymbol($idSite); + $currencySymbol = Site::getCurrencySymbolFor($idSite); $currencyBefore = $currencySymbol . $space; $currencyAfter = ''; // (maybe more currencies prefer this notation?) @@ -190,42 +190,6 @@ class Formatter } /** - * Returns the currency symbol for a site. - * - * @param int $idSite The ID of the site to return the currency symbol for. - * @return string eg, `'$'`. - * @api - */ - public static function getCurrencySymbol($idSite) - { - $symbols = self::getCurrencyList(); - $currency = Site::getCurrencyFor($idSite); - - if (isset($symbols[$currency])) { - return $symbols[$currency][0]; - } - - return ''; - } - - /** - * Returns the list of all known currency symbols. - * - * @return array An array mapping currency codes to their respective currency symbols - * and a description, eg, `array('USD' => array('$', 'US dollar'))`. - * - * @deprecated Use Piwik\Intl\Data\Provider\CurrencyDataProvider instead. - * @see \Piwik\Intl\Data\Provider\CurrencyDataProvider::getCurrencyList() - * @api - */ - public static function getCurrencyList() - { - /** @var CurrencyDataProvider $dataProvider */ - $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\CurrencyDataProvider'); - return $dataProvider->getCurrencyList(); - } - - /** * Formats all metrics, including processed metrics, for a DataTable. Metrics to format * are found through report metadata and DataTable metadata. * |