Refactored out of CRM_Core_PseudoConstant: ufGroup(), currencySymbols(). CRM-12464
authorAllen Shaw <allen@emphanos.com>
Thu, 2 May 2013 23:36:32 +0000 (16:36 -0700)
committerColeman Watts <coleman@civicrm.org>
Thu, 30 May 2013 05:13:21 +0000 (22:13 -0700)
----------------------------------------
* CRM-12464: Search improvements in 4.4
  http://issues.civicrm.org/jira/browse/CRM-12464

28 files changed:
CRM/ACL/Form/ACL.php
CRM/ACL/Page/ACL.php
CRM/Contribute/BAO/Query.php
CRM/Core/BAO/UFGroup.php
CRM/Core/Config/Variables.php
CRM/Core/Permission.php
CRM/Core/PseudoConstant.php
CRM/Profile/Form.php
CRM/Report/Form/Grant/Statistics.php
CRM/UF/Page/Group.php
CRM/Utils/Money.php
tests/phpunit/CRM/Core/PseudoConstantTest.php
xml/schema/Contribute/Contribution.xml
xml/schema/Contribute/ContributionPage.xml
xml/schema/Contribute/ContributionRecur.xml
xml/schema/Contribute/ContributionSoft.xml
xml/schema/Contribute/Product.xml
xml/schema/Core/UFField.xml
xml/schema/Core/UFJoin.xml
xml/schema/Event/Event.xml
xml/schema/Event/Participant.xml
xml/schema/Financial/FinancialItem.xml
xml/schema/Financial/FinancialTrxn.xml
xml/schema/Financial/OfficialReceipt.xml
xml/schema/Grant/Grant.xml
xml/schema/PCP/PCP.xml
xml/schema/Pledge/Pledge.xml
xml/schema/Pledge/PledgePayment.xml

index 77bd2664bfd2382fbf1c085049c14ff01bcb48f6..517a5c519f1493ff52536de447455643507b261f 100644 (file)
@@ -170,7 +170,7 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
 
     $ufGroup = array('-1' => ts('- select -'),
       '0' => ts('All Profiles'),
-    ) + CRM_Core_PseudoConstant::ufGroup();
+    ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFGroup', 'uf_group_id');
 
     $event = array('-1' => ts('- select -'),
       '0' => ts('All Events'),
index 7a0cd9cbc385fc5055735c2b9cd8fdc7b2abbc63..6eb0838281121826716050574b53cd3f55441150 100644 (file)
@@ -180,7 +180,7 @@ ORDER BY entity_id
     ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
     $ufGroup = array('-1' => ts('- select -'),
       '0' => ts('All Profiles'),
-    ) + CRM_Core_PseudoConstant::ufGroup();
+    ) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFGroup', 'uf_group_id');
 
     $event = array('-1' => ts('- select -'),
       '0' => ts('All Events'),
index d57cc0965007288c29d8345b702608f430f70cf9..6c0791317adac19ef7b58d34100487ac2be2a852 100644 (file)
@@ -509,7 +509,7 @@ class CRM_Contribute_BAO_Query {
       // Supporting search for currency type -- CRM-4711
 
       case 'contribution_currency_type':
-        $currencySymbol = CRM_Core_PseudoConstant::currencySymbols('name');
+        $currencySymbol = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array('labelColumn' => 'name'));
         $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("civicrm_contribution.currency",
           $op, $currencySymbol[$value], "String"
         );
@@ -767,7 +767,7 @@ class CRM_Contribute_BAO_Query {
       ts('Currency Type'),
       array(
         '' => ts('- any -')) +
-      CRM_Core_PseudoConstant::currencySymbols('name')
+      CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array('labelColumn' => 'name'))
     );
 
     $form->add('select', 'financial_type_id',
index 777444d25fc50c27651efec51b63ce90c96669be..f7e93f1ea5ed359e00ea8af9157f6749c8841308 100644 (file)
@@ -220,7 +220,7 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup {
       $fields = $subset;
     }
     else {
-      $ufGroups = CRM_Core_PseudoConstant::ufGroup();
+      $ufGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFGroup', 'uf_group_id');
 
       $fields = array();
       foreach ($ufGroups as $id => $title) {
@@ -2446,7 +2446,7 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
    */
   static function getProfiles($types, $onlyPure = FALSE) {
     $profiles = array();
-    $ufGroups = CRM_Core_PseudoConstant::ufgroup();
+    $ufGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFGroup', 'uf_group_id');
 
     CRM_Utils_Hook::aclGroup(CRM_Core_Permission::ADMIN, NULL, 'civicrm_uf_group', $ufGroups, $ufGroups);
 
@@ -2479,7 +2479,7 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
     }
 
     $profiles = array();
-    $ufGroups = CRM_Core_PseudoConstant::ufgroup();
+    $ufGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFGroup', 'uf_group_id');
 
     CRM_Utils_Hook::aclGroup(CRM_Core_Permission::ADMIN, NULL, 'civicrm_uf_group', $ufGroups, $ufGroups);
 
index 66bf8e13d1cdb9454dea06cf0ddc5fb5447aa5d7..c06c81e55f0bbd5a93c6f9e41d3ba1fb4988ebe4 100644 (file)
@@ -484,8 +484,8 @@ class CRM_Core_Config_Variables extends CRM_Core_Config_Defaults {
     static $cachedSymbol = NULL;
     if (!$cachedSymbol || $defaultCurrency) {
       if ($this->defaultCurrency || $defaultCurrency) {
-        $currencySymbolName = CRM_Core_PseudoConstant::currencySymbols('name');
-        $currencySymbol = CRM_Core_PseudoConstant::currencySymbols();
+        $currencySymbolName = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array('labelColumn' => 'name'));
+        $currencySymbol = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency');
 
         $this->currencySymbols = array_combine($currencySymbolName, $currencySymbol);
         $currency = $defaultCurrency ? $defaultCurrency : $this->defaultCurrency;
index d3c318cdbca91855727e9ebbfe75b80cdb0ab6de..4b8aafbcd5d08b821a14970761e400ec9b5a9e43 100644 (file)
@@ -209,7 +209,7 @@ class CRM_Core_Permission {
   }
 
   public static function ufGroup($type = CRM_Core_Permission::VIEW) {
-    $ufGroups = CRM_Core_PseudoConstant::ufGroup();
+    $ufGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFGroup', 'uf_group_id');
 
     $allGroups = array_keys($ufGroups);
 
index 15ecee40b02479ac291b3cfe726827168bd32330..656bed77e60c2668c4c9b5681a45200d80037bb0 100644 (file)
@@ -133,13 +133,6 @@ class CRM_Core_PseudoConstant {
    */
   private static $staticGroup;
 
-  /**
-   * user framework groups
-   * @var array
-   * @static
-   */
-  private static $ufGroup;
-
   /**
    * currency codes
    * @var array
@@ -147,13 +140,6 @@ class CRM_Core_PseudoConstant {
    */
   private static $currencyCode;
 
-  /**
-   * currency Symbols
-   * @var array
-   * @static
-   */
-  private static $currencySymbols;
-
   /**
    * payment processor
    * @var array
@@ -241,11 +227,13 @@ class CRM_Core_PseudoConstant {
   public static function get($daoName, $fieldName, $params = array()) {
     $dao = new $daoName;
     $fields = $dao->fields();
+    $fieldKeys = $dao->fieldKeys();
+    $fieldKey = $fieldKeys[$fieldName];
     $dao->free();
-    if (empty($fields[$fieldName])) {
+    if (empty($fields[$fieldKey])) {
       return FALSE;
     }
-    $fieldSpec = $fields[$fieldName];
+    $fieldSpec = $fields[$fieldKey];
     $flip = !empty($params['flip']);
 
     // If the field is an enum, explode the enum definition and return the array.
@@ -299,7 +287,10 @@ class CRM_Core_PseudoConstant {
           // Get list of fields for the option table
           $daoName = CRM_Core_AllCoreTables::getClassForTable($pseudoconstant['table']);
           $dao = new $daoName;
-          $availableFields = $dao->fields();
+          $availableFields = array_keys($dao->fieldKeys());
+          if (in_array('is_active', $availableFields)) {
+            $wheres[] = 'is_active = 1';
+          }
           $dao->free();
 
           $select = "SELECT %1 AS id, %2 AS label";
@@ -882,21 +873,6 @@ WHERE  id = %1";
     return self::$staticGroup;
   }
 
-  /**
-   * Get all the user framework groups
-   *
-   * @access public
-   *
-   * @return array - array reference of all groups.
-   * @static
-   */
-  public static function &ufGroup() {
-    if (!self::$ufGroup) {
-      self::populate(self::$ufGroup, 'CRM_Core_DAO_UFGroup', FALSE, 'title', 'is_active', NULL, 'title');
-    }
-    return self::$ufGroup;
-  }
-
   /**
    * Get all Relationship Types  from database.
    *
@@ -943,25 +919,6 @@ WHERE  id = %1";
     return self::$relationshipType[$valueColumnName];
   }
 
-  /**
-   * Get all the Currency Symbols from Database
-   *
-   * @access public
-   *
-   * @return array - array reference of all Currency Symbols
-   * @static
-   *
-   * FIXME: this is not stored as an optionValue, and it's not tied to a single DB column;
-   * FIXME: It's used for a setting stored in option group 'currencies_enabled'. What to do?
-   */
-  public static function &currencySymbols($name = 'symbol', $key = 'id') {
-    $cacheKey = "{$name}_{$key}";
-    if (!isset(self::$currencySymbols[$cacheKey])) {
-      self::populate(self::$currencySymbols[$cacheKey], 'CRM_Financial_DAO_Currency', TRUE, $name, NULL, NULL, 'name', $key);
-    }
-    return self::$currencySymbols[$cacheKey];
-  }
-
   /**
    * get all the ISO 4217 currency codes
    *
index 5a5d79202558b0cab7e551fae047bc87fd767000..555651e01c3b2c9eff6033b334822acc5dbe84fc 100644 (file)
@@ -680,7 +680,7 @@ class CRM_Profile_Form extends CRM_Core_Form {
             CRM_Core_Permission::EDIT,
             NULL,
             'civicrm_uf_group',
-            CRM_Core_PseudoConstant::ufGroup()
+            CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFGroup', 'uf_group_id')
           )
         )
       ) {
index 26d693aecf27f2190208549cee5bd30806faf5f5..b6b1ac4eb98284d97a3402da581f1a964f92399b 100644 (file)
@@ -548,7 +548,7 @@ SELECT COUNT({$this->_aliases['civicrm_grant']}.id) as count ,
       return;
     }
 
-    $currencies = CRM_Core_PseudoConstant::currencySymbols('symbol', 'name');
+    $currencies = CRM_Core_PseudoConstant::get('CRM_Grant_DAO_Grant', 'currency');
     $currency = $currencies[$values['civicrm_grant_currency']];
 
     if (!$customData) {
index d3515ee31a423129c58e8d8a9538d4a2c93eff0b..2c559e34ad56d04132cdf1348410e91db0306e94 100644 (file)
@@ -298,7 +298,7 @@ class CRM_UF_Page_Group extends CRM_Core_Page {
       return;
     }
 
-    $ufGroups = CRM_Core_PseudoConstant::ufGroup();
+    $ufGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFGroup', 'uf_group_id');
     CRM_Utils_Hook::aclGroup(CRM_Core_Permission::ADMIN, NULL, 'civicrm_uf_group', $ufGroups, $allUFGroups);
 
     foreach ($allUFGroups as $id => $value) {
index 96f647648969b54135fe2c829cf90b483df51af5..151c2f0627d32a5c0cf52ebf93b347a938972bbd 100644 (file)
@@ -78,8 +78,8 @@ class CRM_Utils_Money {
     }
 
     if (!self::$_currencySymbols) {
-      $currencySymbolName = CRM_Core_PseudoConstant::currencySymbols('name');
-      $currencySymbol = CRM_Core_PseudoConstant::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_combine($currencySymbolName, $currencySymbol);
     }
index 54d4f18b2137e291b1684ce6eb27a512c90a38ab..6e56febaff677982a03160b42460a81a2a49c806 100644 (file)
@@ -48,13 +48,15 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
    * DAO fields having a <pseudoconstant> tag in the XML schema.
    */
   function testOptionValues() {
-    $custom_group_name = 'Test custom group';
+
+    $custom_group_name = md5(microtime());
     $api_params = array(
-        'version' => 3,
-        'title' => $custom_group_name,
-        'extends' => 'Individual',
+      'version' => 3,
+      'title' => $custom_group_name,
+      'extends' => 'Individual',
+      'is_active' => TRUE,
     );
-    civicrm_api('customGroup', 'create', $api_params);
+    $result = civicrm_api('customGroup', 'create', $api_params);
 
     /**
      * daoName/field combinations to test
@@ -66,6 +68,118 @@ class CRM_Core_PseudoConstantTest extends CiviUnitTestCase {
      * - max: integer (default = 10) maximum number of option values expected.
      */
     $fields = array(
+      'CRM_Event_DAO_Participant' => array(
+        array(
+          'fieldName' => 'fee_currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Core_DAO_UFField' => array(
+        array(
+          'fieldName' => 'uf_group_id',
+          'sample' => 'Name and Address',
+          'max' => 15,
+        ),
+      ),
+      'CRM_Core_DAO_UFJoin' => array(
+        array(
+          'fieldName' => 'uf_group_id',
+          'sample' => 'Name and Address',
+          'max' => 15,
+        ),
+      ),
+      'CRM_Contribute_DAO_ContributionSoft' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Contribute_DAO_Contribution' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Contribute_DAO_Product' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Contribute_DAO_ContributionPage' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Contribute_DAO_ContributionRecur' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Event_DAO_Event' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Financial_DAO_FinancialItem' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Financial_DAO_OfficialReceipt' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Financial_DAO_FinancialTrxn' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Grant_DAO_Grant' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Pledge_DAO_PledgePayment' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_Pledge_DAO_Pledge' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
+      'CRM_PCP_DAO_PCP' => array(
+        array(
+          'fieldName' => 'currency',
+          'sample' => '$',
+          'max' => 200,
+        ),
+      ),
       'CRM_Core_DAO_CustomField' => array(
         array(
           'fieldName' => 'custom_group_id',
index 60bd84cade7de49223fcd036b59baafec94d6bab..bbf4063f4bd6fe14b3d176a17c7c29498a7024f6 100644 (file)
     <headerPattern>/cur(rency)?/i</headerPattern>
     <dataPattern>/^[A-Z]{3}$/i</dataPattern>
     <comment>3 character string, value from config setting or input via user.</comment>
-    <add>1.3</add>   
+    <add>1.3</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>symbol</labelColumn>
+    </pseudoconstant>
   </field> 
   <field>  
     <name>cancel_date</name>  
index 3522119d1871764113f6ed3f4548f2e6a11d124b..d48d1886c84b875847f14d2a36ccbea4fd2945f0 100644 (file)
     <headerPattern>/cur(rency)?/i</headerPattern>
     <dataPattern>/^[A-Z]{3}$/i</dataPattern>
     <comment>3 character string, value from config setting or input via user.</comment>
-    <add>3.3</add>   
+    <add>3.3</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>symbol</labelColumn>
+    </pseudoconstant>
   </field> 
   <field> 
     <name>campaign_id</name> 
index e2a2171a048d175a83ff90cfc13bc7a4cd426dfd..c6f6f8d47ec46789b011fa8d84dd795ebce37b28 100644 (file)
     <default>NULL</default>
     <comment>3 character string, value from config setting or input via user.</comment>
     <add>3.2</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>symbol</labelColumn>
+    </pseudoconstant>
   </field>
   <field>
     <name>frequency_unit</name>
index dbdae71ad5d386dc47cc962c33864a526cd4cda2..e298d9f8069faecfca75dff63586176ee1a4635d 100644 (file)
       <default>NULL</default>
       <comment>3 character string, value from config setting or input via user.</comment>
       <add>3.2</add>
+      <pseudoconstant>
+        <table>civicrm_currency</table>
+        <keyColumn>name</keyColumn>
+        <labelColumn>symbol</labelColumn>
+      </pseudoconstant>
   </field>
   <field> 
       <name>pcp_id</name> 
index 650ee4e8b64b6c106cc1e5a24d0dc90821941113..8ac583a904b48c4b4cf4e22b605f5ffea52c317e 100644 (file)
       <default>NULL</default>
       <comment>3 character string, value from config setting or input via user.</comment>
       <add>3.2</add>
+      <pseudoconstant>
+        <table>civicrm_currency</table>
+        <keyColumn>name</keyColumn>
+        <labelColumn>symbol</labelColumn>
+      </pseudoconstant>
   </field>
   <field>     
       <name>financial_type_id</name> 
index 48ecbf7cda105b74b9b6380277216f28366df614..47eafa0a65cdfaac5e7b8a7de77a283a3f3302e6 100644 (file)
       <required>true</required>
       <comment>Which form does this field belong to.</comment>
       <add>1.1</add>
+      <pseudoconstant>
+        <table>civicrm_uf_group</table>
+        <keyColumn>id</keyColumn>
+        <labelColumn>title</labelColumn>
+      </pseudoconstant>
   </field>
   <foreignKey>
        <name>uf_group_id</name>
index 64c539329fcfa80402561bd6d23983c8aec9a8f0..0af165a9d68180fd9dfd26ab21d822034973c3d5 100644 (file)
       <type>int unsigned</type> 
       <required>true</required> 
       <comment>Which form does this field belong to.</comment> 
-      <add>1.3</add> 
+      <add>1.3</add>
+      <pseudoconstant>
+        <table>civicrm_uf_group</table>
+        <keyColumn>id</keyColumn>
+        <labelColumn>title</labelColumn>
+      </pseudoconstant>
   </field> 
   <foreignKey> 
        <name>uf_group_id</name> 
index 4dffb82c410291301f600febe40ef86d2d7bc510..2e3f4aa9a57bc48822cc8134801f7aba5fa7a8dc 100644 (file)
     <dataPattern>/^[A-Z]{3}$/i</dataPattern>
     <comment>3 character string, value from config setting or input via user.</comment>
     <add>3.3</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>symbol</labelColumn>
+    </pseudoconstant>
   </field>
   <field>
     <name>campaign_id</name>
index 604877a73cb6f8ab5853c60e2034b31f54b79cb8..1d5a9a3b6e8336f9d184047eac5534793cf95064 100644 (file)
       <dataPattern>/^[A-Z]{3}$/i</dataPattern>
       <comment>3 character string, value derived from config setting.</comment>
       <add>3.0</add>
+      <pseudoconstant>
+        <table>civicrm_currency</table>
+        <keyColumn>name</keyColumn>
+        <labelColumn>symbol</labelColumn>
+      </pseudoconstant>
   </field>
   <field> 
       <name>campaign_id</name> 
index 540387acc7dd4103105ddc9c43694fd94474519b..586b1c2eda73a64a1eefebfe5339fabf6ae26682 100644 (file)
     <length>3</length>
     <comment>Currency for the amount</comment>
     <add>4.3</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>symbol</labelColumn>
+    </pseudoconstant>
   </field>
   <field>
     <name>financial_account_id</name>
index 511e8e94892536964f9d288b16a1842328cf8143..edea2e076ac490c034c266ea5bb7c0476b1dc966 100755 (executable)
     <dataPattern>/^[A-Z]{3}$/</dataPattern>
     <comment>3 character string, value from config setting or input via user.</comment>
     <add>1.3</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>symbol</labelColumn>
+    </pseudoconstant>
   </field>
   <field>       
     <name>payment_processor</name>    
index f0250b075de845da59785cfb088735cacab22fcd..576768a5e8445042241cd8d5ae63d9215d030293 100755 (executable)
       <dataPattern>/^[A-Z]{3}$/</dataPattern>
       <comment>3 character string, value from config setting or input via user.</comment>
       <add>4.1</add>
+      <pseudoconstant>
+        <table>civicrm_currency</table>
+        <keyColumn>name</keyColumn>
+        <labelColumn>symbol</labelColumn>
+      </pseudoconstant>
   </field>
   <field> 
       <name>msg_template_id</name> 
index ef4b4b40f07e295741a9d056a874d799013d9f00..7560a4036bbcf9277922722c6cfb27d6a0bda4b8 100644 (file)
     <required>true</required>
     <comment>3 character string, value from config setting or input via user.</comment>
     <add>3.2</add>
+      <pseudoconstant>
+        <table>civicrm_currency</table>
+        <keyColumn>name</keyColumn>
+        <labelColumn>symbol</labelColumn>
+      </pseudoconstant>
   </field>
   <field>
     <name>currency</name>
index 37ebfbdeb3b747d51c1d69af826183645738d050..5cde13f68b0c23f18ff570fce3ec3cd81866ba96 100644 (file)
       <default>NULL</default>
       <comment>3 character string, value from config setting or input via user.</comment>
       <add>3.2</add>
+      <pseudoconstant>
+        <table>civicrm_currency</table>
+        <keyColumn>name</keyColumn>
+        <labelColumn>symbol</labelColumn>
+      </pseudoconstant>
   </field>
   <field>      
       <name>referer</name>
index 4c95b343dd9774b9484cd83cec4e9d81d8f13f2f..50a0c19845ba7a92ded9e5b26d42cad3aeebcb1c 100644 (file)
     <default>NULL</default>
     <comment>3 character string, value from config setting or input via user.</comment>
     <add>3.2</add>
+    <pseudoconstant>
+      <table>civicrm_currency</table>
+      <keyColumn>name</keyColumn>
+      <labelColumn>symbol</labelColumn>
+    </pseudoconstant>
   </field>
   <field>
     <name>frequency_unit</name>
index dc2342d5e67cf3a3e07ffad5128c8b524affd541..5d5adf21394bf913614a4bb6aa0add921e2c881a 100644 (file)
       <default>NULL</default>
       <comment>3 character string, value from config setting or input via user.</comment>
       <add>3.2</add>
+      <pseudoconstant>
+        <table>civicrm_currency</table>
+        <keyColumn>name</keyColumn>
+        <labelColumn>symbol</labelColumn>
+      </pseudoconstant>
   </field>
   <field>
        <name>scheduled_date</name>