From ce9a0d0366c09c2043bcf1b8dad7e53c34564869 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 7 Jan 2022 10:42:37 +1300 Subject: [PATCH] Remove / deprecate case code It's clear it can't be passed in from the separated off version & it also is not reached from the importer - which leaves only external usages (not supported but deprecation will do for now) --- CRM/Contact/BAO/Contact/Utils.php | 4 ---- CRM/Contact/BAO/Relationship.php | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CRM/Contact/BAO/Contact/Utils.php b/CRM/Contact/BAO/Contact/Utils.php index e6fb6026b3..f3679cab81 100644 --- a/CRM/Contact/BAO/Contact/Utils.php +++ b/CRM/Contact/BAO/Contact/Utils.php @@ -342,10 +342,6 @@ WHERE id IN ( $idString ) continue; } - //CRM-16978:check duplicate relationship as per case id. - if ($caseId = CRM_Utils_Array::value('case_id', $params)) { - $contactFields['case_id'] = $caseId; - } if ( CRM_Contact_BAO_Relationship::checkDuplicateRelationship( $contactFields, diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index 2d623c5dae..502f6b143a 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -193,7 +193,9 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship { } //CRM-16978:check duplicate relationship as per case id. + // https://issues.civicrm.org/jira/browse/CRM-16978 if ($caseId = CRM_Utils_Array::value('case_id', $params)) { + CRM_Core_Error::deprecatedWarning('this code is believed to be unreachable'); $contactFields['case_id'] = $caseId; } if ( -- 2.25.1