X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FBatch.php;h=9e93ad9f4e1fe12df8dd18f8b30f17adbd09254f;hb=f52694340988cd29f5f80b6392e7662bf33e8bf2;hp=36b5ee35df53ca7868aae8e1b67d04bb74426bd5;hpb=a48554e4573dccc22fe68c481db7ba85d1768c81;p=civicrm-core.git diff --git a/api/v3/Batch.php b/api/v3/Batch.php index 36b5ee35df..9e93ad9f4e 100644 --- a/api/v3/Batch.php +++ b/api/v3/Batch.php @@ -37,6 +37,8 @@ * @param array $params * * @return array + * @throws \API_Exception + * @throws \Civi\API\Exception\UnauthorizedException */ function civicrm_api3_batch_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'Batch'); @@ -56,8 +58,10 @@ function _civicrm_api3_batch_create_spec(&$params) { $params['entity_table']['api.default'] = "civicrm_batch"; $params['entity_table']['type'] = CRM_Utils_Type::T_STRING; $params['entity_table']['title'] = 'Batch Entity Table - remove?'; - - $params['modified_date']['api.default'] = "now"; + $params['created_id']['api.default'] = 'user_contact_id'; + $params['created_date']['api.default'] = 'now'; + $params['modified_id']['api.default'] = 'user_contact_id'; + $params['modified_date']['api.default'] = 'now'; $params['status_id']['api.required'] = 1; $params['title']['api.required'] = 1; $params['status_id']['api.required'] = 1; @@ -82,6 +86,8 @@ function civicrm_api3_batch_get($params) { * * @return array * Array of deleted values. + * @throws \API_Exception + * @throws \Civi\API\Exception\UnauthorizedException */ function civicrm_api3_batch_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);