From 5e96f97872b71f032e032e104197557408503f15 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Thu, 26 Feb 2015 17:22:45 +0530 Subject: [PATCH] additional changes for CRM-15889 --- CRM/Contact/BAO/Relationship.php | 2 +- CRM/Contact/Form/Relationship.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index 87ac2ad6dd..62f2ae86a5 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -206,7 +206,7 @@ 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); - self::setContactABFromIDs($params); + self::setContactABFromIDs($params, $ids); $relationshipTypes = CRM_Utils_Array::value('relationship_type_id', $params); // explode the string with _ to get the relationship type id diff --git a/CRM/Contact/Form/Relationship.php b/CRM/Contact/Form/Relationship.php index 6bda27e560..9d8722ce65 100644 --- a/CRM/Contact/Form/Relationship.php +++ b/CRM/Contact/Form/Relationship.php @@ -519,7 +519,7 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { // Membership for related contacts CRM-1657 if (CRM_Core_Permission::access('CiviMember') && (!$duplicate)) { $params['relationship_ids'] = $relationshipIds; - if ($this->_action & CRM_Core_Action::ADD) { + if ($this->_action & CRM_Core_Action::ADD && !empty($params['is_active'])) { CRM_Contact_BAO_Relationship::relatedMemberships($this->_contactId, $params, $ids, $this->_action -- 2.25.1