From e0e29b3ce5d396bb2f01e96e27a414d7541b4435 Mon Sep 17 00:00:00 2001 From: eileen Date: Sun, 28 Jul 2013 00:10:11 +1200 Subject: [PATCH] CRM-13072 set domain default for UF_Match on BAO layer rather than requiring on api --- CRM/Core/BAO/UFMatch.php | 3 +++ api/v3/UFMatch.php | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) 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; } /** -- 2.25.1