X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FNote.php;h=ed8360c59828549e6192fc9dca368a62066d9550;hb=912a3736c0c169f3d27d9de8495a28983ba9bf4c;hp=598d991d6abafb3c7b7e78d3700a68f8669ae047;hpb=149e631532beb9953cde6af3e647bbc82ee2e3d5;p=civicrm-core.git diff --git a/api/v3/Note.php b/api/v3/Note.php index 598d991d6a..ed8360c598 100644 --- a/api/v3/Note.php +++ b/api/v3/Note.php @@ -1,9 +1,8 @@ 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 */ @@ -125,7 +108,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 */