CRM-13861 : instead of strpos check on 'title' of group lets do a check on profile...
authorPratik Joshi <pratik.joshi@webaccess.co.in>
Tue, 3 Dec 2013 08:52:19 +0000 (14:22 +0530)
committerPratik Joshi <pratik.joshi@webaccess.co.in>
Tue, 3 Dec 2013 08:52:19 +0000 (14:22 +0530)
CRM/Contact/BAO/Relationship.php

index c4c1f11ee87f8fec5e7f39f2bfe053ca6bd25061..4f40d5015a2a501fe7db78e8dcb9a044534e5109 100644 (file)
@@ -1510,7 +1510,8 @@ AND cc.sort_name LIKE '%$name%'";
     } else {
       $contactTypes = array();
       foreach ($contactProfiles as $key => $value) {
-        if (strpos($value, $leftType) !== FALSE) {
+        $groupTypes = CRM_Core_BAO_UFGroup::profileGroups($key);
+        if (in_array($leftType, $groupTypes)) {
           $contactTypes = array($key => $value);
         }
       }