return civicrm_api3_create_error("Address is not created or updated ");
}
else {
- $values = array();
$values = _civicrm_api3_dao_to_array($addressBAO, $params);
return civicrm_api3_create_success($values, $params, 'address', $addressBAO);
}
* @param int $contactID
* If present the contact with that ID is updated.
*
- * @return CRM_Contact_BAO_Contact
- * @access public
+ * @return CRM_Contact_BAO_Contact|CRM_Core_Error
*/
function _civicrm_api3_contact_update($params, $contactID = NULL) {
//@todo - doesn't contact create support 'id' which is already set- check & remove
function _civicrm_api3_entity_tag_common($params, $op = 'add') {
$entityIDs = array();
- $tagsIDs = array();
$entityTable = 'civicrm_contact';
if (is_array($params)) {
foreach ($params as $n => $v) {
*
* @param array $params
* Array of one or more valid.
- * @param array $ids
*
* @return array
* API return Array of matching mailing jobs
* {@getfields mailing_job_get}
*/
-function civicrm_api3_mailing_job_get($params, $ids = array()) {
+function civicrm_api3_mailing_job_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
*
* @param array $params
* Array of one or more valid.
- * @param array $ids
*
* @return array
* API return Array of matching mailing jobs
- * {@getfields mailing_recipient_get}
*/
-function civicrm_api3_mailing_recipients_get($params, $ids = array()) {
+function civicrm_api3_mailing_recipients_get($params)) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
* @return array
*/
function civicrm_api3_payment_processor_type_create($params) {
- $ids = array();
if (isset($params['id']) && !CRM_Utils_Rule::integer($params['id'])) {
return civicrm_api3_create_error('Invalid value for payment_processor type ID');
}
- $payProcType = new CRM_Financial_BAO_PaymentProcessorType();
- $payProcType = CRM_Financial_BAO_PaymentProcessorType::create($params);
+ $paymentProcessorType = CRM_Financial_BAO_PaymentProcessorType::create($params);
$relType = array();
- _civicrm_api3_object_to_array($payProcType, $relType[$payProcType->id]);
+ _civicrm_api3_object_to_array($paymentProcessorType, $relType[$paymentProcessorType->id]);
- return civicrm_api3_create_success($relType, $params, 'payment_processor_type', 'create', $payProcType);
+ return civicrm_api3_create_success($relType, $params, 'payment_processor_type', 'create', $paymentProcessorType);
}
/**
*
* @param array $values
* The reformatted properties that we can use internally.
- * @param bool $create
*
- * @return array|CRM_Error
+ * @return array|CRM_Core_Error
*/
-function _civicrm_api3_pledge_format_params(&$values, $create = FALSE) {
+function _civicrm_api3_pledge_format_params(&$values) {
// probably most of the below can be removed.... just needs a little more review
if (array_key_exists('original_installment_amount', $values)) {