Stop adding field just so the calling code can strip them
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 18 Mar 2023 01:54:13 +0000 (14:54 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 18 Mar 2023 22:15:48 +0000 (11:15 +1300)
The calling code will not use any field with no WHERE clause

CRM/Dedupe/BAO/DedupeRuleGroup.php

index f49bfee4ba057cf86aeac1e7df2b10710cd1021d..09c7ea6c0315cb689189d5d4651d9e682e859cc7 100644 (file)
@@ -241,19 +241,6 @@ class CRM_Dedupe_BAO_DedupeRuleGroup extends CRM_Dedupe_DAO_DedupeRuleGroup {
 
       Civi::cache('fields')->set($cacheKeyString, $fields);
     }
-
-    if (!$isProfile) {
-      if (!$status) {
-        $fields = array_merge(['do_not_import' => ['title' => ts('- do not import -')]],
-          $fields
-        );
-      }
-      else {
-        $fields = array_merge(['' => ['title' => ts('- Contact Fields -')]],
-          $fields
-        );
-      }
-    }
     return $fields;
   }