From 941feb146e3d9ca06423c57df026d33aa1634a89 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 30 Apr 2014 19:32:31 -0700 Subject: [PATCH] CRM-14449 - re-fix case api _spec :-) --- api/v3/Case.php | 3 ++- api/v3/utils.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/v3/Case.php b/api/v3/Case.php index c6f3f6e85f..a6df4a5608 100644 --- a/api/v3/Case.php +++ b/api/v3/Case.php @@ -147,7 +147,8 @@ function _civicrm_api3_case_create_spec(&$params) { $params['contact_id']['title'] = 'Case Client'; $params['contact_id']['api.required'] = 1; $params['status_id']['api.default'] = 1; - $params['created_id']['api.default'] = 'user_contact_id'; + $params['creator_id']['api.default'] = 'user_contact_id'; + $params['creator_id']['type'] = CRM_Utils_Type::T_INT; $params['start_date']['api.default'] = 'now'; $params['medium_id'] = array( 'name' => 'medium_id', diff --git a/api/v3/utils.php b/api/v3/utils.php index 097c6c28c8..8acc21dfc5 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -804,11 +804,13 @@ function _civicrm_api3_get_unique_name_array(&$bao) { /** * Converts an DAO object to an array * - * @param object $dao (reference )object to convert + * @param object $dao (reference )object to convert * @param null $params * @param bool $uniqueFields * @param string $entity * + * @param bool $autoFind + * * @return array * * @params array of arrays (key = id) of array of fields @@ -1562,7 +1564,6 @@ function _civicrm_api3_swap_out_aliases(&$apiRequest, $fields) { * @internal param array $fieldinfo array of fields from getfields function */ function _civicrm_api3_validate_integer(&$params, &$fieldName, &$fieldInfo, $entity) { - //if fieldname exists in params if (!empty($params[$fieldName])) { // if value = 'user_contact_id' (or similar), replace value with contact id if (!is_numeric($params[$fieldName]) && is_scalar($params[$fieldName])) { -- 2.25.1