Commit 941feb14 authored by Eileen McNaughton's avatar Eileen McNaughton

CRM-14449 - re-fix case api _spec :-)

parent ca11b9da
......@@ -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',
......
......@@ -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])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment