additional fixes
authormonishdeb <monish.deb@webaccessglobal.com>
Fri, 12 Jun 2015 13:03:23 +0000 (18:33 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Fri, 12 Jun 2015 13:03:46 +0000 (18:33 +0530)
CRM/Core/BAO/Address.php

index 227bc194ca66873c0d43808aeccfce6d867235b5..49397fc8dc90e73faefcbadb1100c78cf7d62b76 100644 (file)
@@ -1162,8 +1162,7 @@ SELECT is_primary,
 
     // If already there is a relationship record of $relParam criteria, avoid creating relationship again or else
     // it will casue CRM-16588 as the Duplicate Relationship Exception will revert other contact field values on update
-    $relationship = civicrm_api3('relationship', 'get', $relParam);
-    if (!empty($relationship['values'])) {
+    if (CRM_Contact_BAO_Relationship::checkDuplicateRelationship($relParam, $currentContactId, $sharedContactId)) {
       return;
     }