Merge pull request #3138 from colemanw/contactRef
[civicrm-core.git] / CRM / Contact / Form / DedupeRules.php
index 49693acab7538ea98c94ce908466b5fa9143b789..534af8525a8b3114e00aaadfbb22f52c80cd2bc7 100644 (file)
@@ -196,7 +196,7 @@ UPDATE civicrm_dedupe_rule_group
    AND used = %2";
       $queryParams = array(
         1 => array($this->_contactType, 'String'),
-        2 => array($this->_options[$used], 'String'),
+        2 => array($values['used'], 'String'),
       );
 
       CRM_Core_DAO::executeQuery($query, $queryParams);
@@ -288,6 +288,7 @@ UPDATE civicrm_dedupe_rule_group
 
     // also create an index for this dedupe rule
     // CRM-3837
+    CRM_Utils_Hook::dupeQuery($ruleDao, 'dedupeIndexes', $tables);
     CRM_Core_BAO_SchemaHandler::createIndexes($tables, 'dedupe_index', $substrLenghts);
 
     //need to clear cache of deduped contacts