*
* @return string
* SQL query performing the search
+ *
+ * @throws \CRM_Core_Exception
+ * @throws \CiviCRM_API3_Exception
*/
public function sql() {
if ($this->params &&
$id = 'entity_id';
}
else {
- CRM_Core_Error::fatal("Unsupported rule_table for civicrm_dedupe_rule.id of {$this->id}");
+ throw new CRM_Core_Exception("Unsupported rule_table for civicrm_dedupe_rule.id of {$this->id}");
}
break;
}
$ruleBao->find();
$ruleFields = [];
while ($ruleBao->fetch()) {
- $ruleFields[] = $ruleBao->rule_field;
+ $field_name = $ruleBao->rule_field;
+ if ($field_name == 'phone_numeric') {
+ $field_name = 'phone';
+ }
+ $ruleFields[] = $field_name;
}
return $ruleFields;
}