From: jitendrapurohit Date: Thu, 26 Feb 2015 11:52:45 +0000 (+0530) Subject: additional changes for CRM-15889 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5e96f97872b71f032e032e104197557408503f15;p=civicrm-core.git additional changes for CRM-15889 --- 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