X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FNote.php;h=73059ca3a42ebfa21d8aa9641d481b345208bc21;hb=85bb0909cffd925f4cd5c0022a68a1ff74d3ad8e;hp=9595264b038c09dd8ab0650bcbc7267485734291;hpb=52910807c090423707113d77d4e38ef1d606ad6a;p=civicrm-core.git diff --git a/api/v3/Note.php b/api/v3/Note.php index 9595264b03..73059ca3a4 100644 --- a/api/v3/Note.php +++ b/api/v3/Note.php @@ -2,9 +2,9 @@ /* +--------------------------------------------------------------------+ - | CiviCRM version 4.3 | + | CiviCRM version 4.5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2013 | + | Copyright CiviCRM LLC (c) 2004-2014 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -32,7 +32,7 @@ * @package CiviCRM_APIv3 * @subpackage API_Note * - * @copyright CiviCRM LLC (c) 2004-2013 + * @copyright CiviCRM LLC (c) 2004-2014 * @version $Id: Note.php 30879 2010-11-22 15:45:55Z shot $ * */ @@ -57,21 +57,7 @@ * */ function civicrm_api3_note_create($params) { - - $ids = array(); - $ids = array('id' => 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); } /** @@ -95,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 */