CRM-13234 define type for 'Country' custom fields (integer) as e-Notice was picked...
authoreileen <eileen@fuzion.co.nz>
Wed, 21 Aug 2013 11:43:32 +0000 (23:43 +1200)
committereileen <eileen@fuzion.co.nz>
Wed, 21 Aug 2013 11:43:32 +0000 (23:43 +1200)
api/v3/utils.php

index a0798270f4ff078a509569cd995da650ece75ae5..14f6daa352ffbea6d20a59df98bc6410040b507a 100644 (file)
@@ -1360,6 +1360,7 @@ function _getStandardTypeFromCustomDataType($dataType) {
     'File' => CRM_Utils_Type::T_STRING,
     'Link' => CRM_Utils_Type::T_STRING,
     'ContactReference' => CRM_Utils_Type::T_INT,
+    'Country' => CRM_Utils_Type::T_INT,
   );
   return $mapping[$dataType];
 }
@@ -1369,10 +1370,9 @@ function _getStandardTypeFromCustomDataType($dataType) {
 function _civicrm_api3_getdefaults($apiRequest) {
   $defaults = array();
 
-  $result = civicrm_api($apiRequest['entity'],
+  $result = civicrm_api3($apiRequest['entity'],
     'getfields',
     array(
-      'version' => 3,
       'action' => $apiRequest['action'],
     )
   );
@@ -1420,10 +1420,9 @@ function _civicrm_api3_swap_out_aliases(&$apiRequest) {
     }
     return;
   }
-  $result = civicrm_api($apiRequest['entity'],
+  $result = civicrm_api3($apiRequest['entity'],
     'getfields',
     array(
-      'version' => 3,
       'action' => $apiRequest['action'],
     )
   );