API - Improve getfields for getrefcount
authorColeman Watts <coleman@civicrm.org>
Sun, 15 Mar 2015 22:09:27 +0000 (18:09 -0400)
committerColeman Watts <coleman@civicrm.org>
Sun, 15 Mar 2015 22:09:27 +0000 (18:09 -0400)
api/v3/Generic.php

index 3130fd43346738baf61ddc7f3ce8b082f29dca51..1e82908eb6db5ead061d2c7776559e6798e9030e 100644 (file)
@@ -286,9 +286,10 @@ function civicrm_api3_generic_getvalue($apiRequest) {
  *
  * @param array $params
  */
-function _civicrm_api3_generic_getrefcount_spec(&$params) {
+function _civicrm_api3_generic_getrefcount_spec(&$params, $apiRequest) {
   $params['id']['api.required'] = 1;
-  $params['id']['title'] = 'Entity ID';
+  $params['id']['title'] = $apiRequest['entity'] . ' ID';
+  $params['id']['type'] = CRM_Utils_Type::T_INT;
 }
 
 /**