CRM-15439 fix - Regression of CRM-13149 - searching on reciprocal relationships
authormonishdeb <monish.deb@webaccessglobal.com>
Thu, 16 Oct 2014 06:57:33 +0000 (12:27 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Thu, 16 Oct 2014 06:57:33 +0000 (12:27 +0530)
https://issues.civicrm.org/jira/browse/CRM-15439

CRM/Contact/BAO/Query.php

index a1a70ae095b317495368e39293c569865342b376..ac81f718ad6f99fa2bbe2ab0bb1746a206e3f909 100644 (file)
@@ -4059,7 +4059,7 @@ WHERE  id IN ( $groupIDs )
       $params = array('id' => $rel[0]);
       $rType = CRM_Contact_BAO_RelationshipType::retrieve($params, $rTypeValues);
     }
-    if (empty($rTypeValues)) {
+    if (!empty($rTypeValues) && $rTypeValues['name_a_b'] == $rTypeValues['name_b_a']) {
       // if we don't know which end of the relationship we are dealing with we'll create a temp table
       //@todo unless we are dealing with a target group
       self::$_relType = 'reciprocal';