X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FNote.php;h=73059ca3a42ebfa21d8aa9641d481b345208bc21;hb=85bb0909cffd925f4cd5c0022a68a1ff74d3ad8e;hp=18d39198817df3f7f071f269c9f2b94641afd896;hpb=718b280e1acb13d6de99c402df775b16f1826c6d;p=civicrm-core.git diff --git a/api/v3/Note.php b/api/v3/Note.php index 18d3919881..73059ca3a4 100644 --- a/api/v3/Note.php +++ b/api/v3/Note.php @@ -1,11 +1,10 @@ CRM_Utils_Array::value('id', $params)); - $noteBAO = CRM_Core_BAO_Note::add($params, $ids); - - if (is_a($noteBAO, 'CRM_Core_Error')) { - $error = civicrm_api3_create_error("Note could not be created"); - return $error; - } - else { - $note = array(); - _civicrm_api3_object_to_array($noteBAO, $note[$noteBAO->id]); - } - $result = civicrm_api3_create_success($note, $params); - return civicrm_api3_create_success($note, $params); + return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /** * Adjust Metadata for Create action - * + * * The metadata is used for setting defaults, documentation & validation * @param array $params array or parameters determined by getfields */ @@ -96,6 +81,8 @@ function _civicrm_api3_note_create_spec(&$params) { * @params array $paramsarray including id of the note to be deleted * {@getfields note_delete} * + * @param $params + * * @return null * @access public */ @@ -123,7 +110,7 @@ function civicrm_api3_note_get($params) { /** * Adjust Metadata for Get action - * + * * The metadata is used for setting defaults, documentation & validation * @param array $params array or parameters determined by getfields */