From 5ad88e9d3fa1b8d6f03e262985f8ce9a7134b0af Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 16 Mar 2015 16:53:54 +1300 Subject: [PATCH] CRM-16055 remove handling for contact_check from relationship add --- CRM/Contact/BAO/Relationship.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index a7e0bc691f..b0e91f237d 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -149,15 +149,15 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship { $valid = $invalid = $duplicate = $saved = 0; $relationships = $relationshipIds = array(); $relationshipId = CRM_Utils_Array::value('relationship', $ids, CRM_Utils_Array::value('id', $params)); + echo 'relationship id is ' . $relationshipId . "\n"; + //CRM-9015 - the hooks are called here & in add (since add doesn't call create) // but in future should be tidied per ticket if (empty($relationshipId)) { $hook = 'create'; - $action = CRM_Core_Action::ADD; } else { $hook = 'edit'; - $action = CRM_Core_Action::UPDATE; } CRM_Utils_Hook::pre($hook, 'Relationship', $relationshipId, $params); @@ -269,9 +269,6 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship { //@todo hook are called from create and add - remove one CRM_Utils_Hook::pre($hook, 'Relationship', $relationshipId, $params); - // Requirement to set fields in this function is historical & hopefully can go at some point. - $contactFields = self::setContactABFromIDs($params, $ids); - $params = array_merge($params, $contactFields); $relationshipTypes = CRM_Utils_Array::value('relationship_type_id', $params); // explode the string with _ to get the relationship type id -- 2.25.1