From: eileen Date: Sat, 27 Jul 2013 12:10:11 +0000 (+1200) Subject: CRM-13072 set domain default for UF_Match on BAO layer rather than requiring on api X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e0e29b3ce5d396bb2f01e96e27a414d7541b4435;p=civicrm-core.git CRM-13072 set domain default for UF_Match on BAO layer rather than requiring on api --- diff --git a/CRM/Core/BAO/UFMatch.php b/CRM/Core/BAO/UFMatch.php index a2a7315833..ce3284c1c8 100644 --- a/CRM/Core/BAO/UFMatch.php +++ b/CRM/Core/BAO/UFMatch.php @@ -47,6 +47,9 @@ class CRM_Core_BAO_UFMatch extends CRM_Core_DAO_UFMatch { static function create($params) { $hook = empty($params['id']) ? 'create' : 'edit'; CRM_Utils_Hook::pre($hook, 'UFMatch', CRM_Utils_Array::value('id', $params), $params); + if(empty($params['domain_id'])) { + $params['domain_id'] = CRM_Core_Config::domainID(); + } $dao = new CRM_Core_DAO_UFMatch(); $dao->copyValues($params); $dao->save(); diff --git a/api/v3/UFMatch.php b/api/v3/UFMatch.php index 5a30616bbf..d13fb3546b 100644 --- a/api/v3/UFMatch.php +++ b/api/v3/UFMatch.php @@ -77,9 +77,6 @@ function _civicrm_api3_uf_match_create_spec(&$params) { $params['contact_id']['api.required'] = 1; $params['uf_id']['api.required'] = 1; $params['uf_name']['api.required'] = 1; - // note that this should perhaps not be required but need a wrapper level approach - // prefera - $params['domain_id']['api.required'] = 1; } /**