* @throws \CRM_Core_Exception
*/
public static function dupes($rgid, $cids = [], $checkPermissions = TRUE) {
- $rgBao = new CRM_Dedupe_BAO_RuleGroup();
+ $rgBao = new CRM_Dedupe_BAO_DedupeRuleGroup();
$rgBao->id = $rgid;
$rgBao->contactIds = $cids;
if (!$rgBao->find(TRUE)) {
}
$rgBao->fillTable();
- $dao = new CRM_Core_DAO();
- $dao->query($rgBao->thresholdQuery($checkPermissions));
+ $dao = CRM_Core_DAO::executeQuery($rgBao->thresholdQuery($checkPermissions));
$dupes = [];
while ($dao->fetch()) {
$dupes[] = [$dao->id1, $dao->id2, $dao->weight];
}
- $dao->query($rgBao->tableDropQuery());
+ CRM_Core_DAO::executeQuery(($rgBao->tableDropQuery()));
return $dupes;
}
$foundByID = FALSE;
if ($ruleGroupID) {
- $rgBao = new CRM_Dedupe_BAO_RuleGroup();
+ $rgBao = new CRM_Dedupe_BAO_DedupeRuleGroup();
$rgBao->id = $ruleGroupID;
$rgBao->contact_type = $ctype;
if ($rgBao->find(TRUE)) {
}
if (!$foundByID) {
- $rgBao = new CRM_Dedupe_BAO_RuleGroup();
+ $rgBao = new CRM_Dedupe_BAO_DedupeRuleGroup();
$rgBao->contact_type = $ctype;
$rgBao->used = $used;
if (!$rgBao->find(TRUE)) {
}
$params = [];
- $supportedFields = CRM_Dedupe_BAO_RuleGroup::supportedFields($ctype);
+ $supportedFields = CRM_Dedupe_BAO_DedupeRuleGroup::supportedFields($ctype);
if (is_array($supportedFields)) {
foreach ($supportedFields as $table => $fields) {
if ($table === 'civicrm_address') {