Commit 43fee107 authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub

Merge pull request #14535 from colemanw/addressCustom

Address BAO - Handle standard 'custom' param as well as individual fields
parents a83adcb2 2c59f0ca
......@@ -162,6 +162,10 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address {
$address->save();
if ($address->id) {
if (isset($params['custom'])) {
$addressCustom = $params['custom'];
}
else {
$customFields = CRM_Core_BAO_CustomField::getFields('Address', FALSE, TRUE, NULL, NULL, FALSE, FALSE, $checkPermissions);
if (!empty($customFields)) {
......@@ -172,6 +176,7 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address {
$checkPermissions
);
}
}
if (!empty($addressCustom)) {
CRM_Core_BAO_CustomValueTable::store($addressCustom, 'civicrm_address', $address->id);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment