'id' => array('title' => 'Unique Identifier',
'api.required' => 1,
'api.aliases' => array($lcase_entity . '_id'),
+ 'type' => CRM_Utils_Type::T_INT,
));
break;
* @return integer count of results
*/
function civicrm_api3_generic_getcount($apiRequest) {
+ $apiRequest['params']['options']['is_count'] = TRUE;
$result = civicrm_api($apiRequest['entity'], 'get', $apiRequest['params']);
+ if(is_numeric (CRM_Utils_Array::value('values', $result))) {
+ return (int) $result['values'];
+ }
return $result['count'];
}