From a7ac519aa75a29a0cbcf5941249798f1290174cd Mon Sep 17 00:00:00 2001 From: monishdeb Date: Thu, 22 May 2014 20:18:44 +0530 Subject: [PATCH] CRM-14724 fix - when viewing b to a relationship link to contact a returns contact b https://issues.civicrm.org/jira/browse/CRM-14724 --- CRM/Contact/BAO/Relationship.php | 2 +- CRM/Contact/Page/View/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 545115dcfc..d3cff83614 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -1700,7 +1700,7 @@ AND cc.sort_name LIKE '%$name%'"; $contactRelationships[$relationshipId]['name'] = CRM_Utils_System::href( $values['name'], 'civicrm/contact/view', - "reset=1&cid={$values['contact_id_b']}"); + "reset=1&cid={$values['cid']}"); $contactRelationships[$relationshipId]['relation'] = CRM_Utils_System::href( $values['relation'], diff --git a/CRM/Contact/Page/View/Relationship.php b/CRM/Contact/Page/View/Relationship.php index f559f91c83..3738957ff3 100644 --- a/CRM/Contact/Page/View/Relationship.php +++ b/CRM/Contact/Page/View/Relationship.php @@ -79,7 +79,7 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page { $this->assign('isCurrentEmployer', FALSE); $relTypes = CRM_Utils_Array::index(array('name_a_b'), CRM_Core_PseudoConstant::relationshipType('name')); - + if ($viewRelationship[$this->_id]['employer_id'] == $this->_contactId) { $this->assign('isCurrentEmployer', TRUE); } -- 2.25.1