From cba74230361cc5763e80ef9133616aaf8d99fcce Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 12 Jun 2013 15:41:04 -0700 Subject: [PATCH] Fix currency pseudoconstant CRM-12464 ---------------------------------------- * CRM-12464: Add PseudoConstants to Schema Metadata http://issues.civicrm.org/jira/browse/CRM-12464 --- CRM/Report/Form/Grant/Statistics.php | 2 +- CRM/Utils/Money.php | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CRM/Report/Form/Grant/Statistics.php b/CRM/Report/Form/Grant/Statistics.php index 22eea407bb..0bebee9344 100644 --- a/CRM/Report/Form/Grant/Statistics.php +++ b/CRM/Report/Form/Grant/Statistics.php @@ -548,7 +548,7 @@ SELECT COUNT({$this->_aliases['civicrm_grant']}.id) as count , return; } - $currencies = CRM_Core_PseudoConstant::get('CRM_Grant_DAO_Grant', 'currency'); + $currencies = CRM_Core_PseudoConstant::get('CRM_Grant_DAO_Grant', 'currency', array('labelColumn' => 'symbol')); $currency = $currencies[$values['civicrm_grant_currency']]; if (!$customData) { diff --git a/CRM/Utils/Money.php b/CRM/Utils/Money.php index 6a9880f274..6ffa9b5c59 100644 --- a/CRM/Utils/Money.php +++ b/CRM/Utils/Money.php @@ -78,10 +78,7 @@ class CRM_Utils_Money { } if (!self::$_currencySymbols) { - $currencySymbolName = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array('labelColumn' => 'name')); - $currencySymbol = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency'); - - self::$_currencySymbols = array_intersect_key($currencySymbol, $currencySymbolName); + self::$_currencySymbols = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array('keyColumn' => 'name', 'labelColumn' => 'symbol')); } if (!$currency) { -- 2.25.1