Use the procesor function to get event tokens
[civicrm-core.git] / CRM / Dedupe / Merger.php
index aa3daad5aa494ad884053cab7e0cc80580aa22bf..a34962d8d11b376bdb7c37eb8b6428ee7c0379a1 100644 (file)
@@ -1282,10 +1282,12 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
 
     // handle custom fields
     $mainTree = CRM_Core_BAO_CustomGroup::getTree($main['contact_type'], NULL, $mainId, -1,
-      CRM_Utils_Array::value('contact_sub_type', $main), NULL, TRUE, NULL, TRUE, $checkPermissions
+      CRM_Utils_Array::value('contact_sub_type', $main), NULL, TRUE, NULL, TRUE,
+      $checkPermissions ? CRM_Core_Permission::EDIT : FALSE
     );
     $otherTree = CRM_Core_BAO_CustomGroup::getTree($main['contact_type'], NULL, $otherId, -1,
-      CRM_Utils_Array::value('contact_sub_type', $other), NULL, TRUE, NULL, TRUE, $checkPermissions
+      CRM_Utils_Array::value('contact_sub_type', $other), NULL, TRUE, NULL, TRUE,
+      $checkPermissions ? CRM_Core_Permission::EDIT : FALSE
     );
 
     foreach ($otherTree as $gid => $group) {