CRM-16741 fix - Invalid relationship is shown when selecting "relationship type"
authormonishdeb <monish.deb@webaccessglobal.com>
Thu, 25 Jun 2015 20:23:16 +0000 (01:53 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Thu, 25 Jun 2015 20:23:16 +0000 (01:53 +0530)
https://issues.civicrm.org/jira/browse/CRM-16741

CRM/Contact/BAO/Relationship.php

index b3577297b32c275fc9869fc228c37ddf02ed549f..f6f5c6bd122fd7f83e300df1f14d1f9dddd4caf6 100644 (file)
@@ -561,7 +561,6 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
           $value['contact_type_b'] == $otherContactType
         ) &&
         (in_array($value['contact_sub_type_a'], $contactSubType) ||
-          in_array($value['contact_sub_type_b'], $contactSubType) ||
           (!$value['contact_sub_type_a'] && !$onlySubTypeRelationTypes)
         )
       ) {
@@ -576,7 +575,6 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
           $value['contact_type_a'] == $otherContactType
         ) &&
         (in_array($value['contact_sub_type_b'], $contactSubType) ||
-          in_array($value['contact_sub_type_a'], $contactSubType) ||
           (!$value['contact_sub_type_b'] && !$onlySubTypeRelationTypes)
         )
       ) {