From 07faccfa3791216511cbbba25174b04743ef5883 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 7 Feb 2018 10:17:27 -0700 Subject: [PATCH] Use duplicate threshold preference instead of constant 2 for edit dialog duplication check --- addressbook/inc/class.addressbook_ui.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 7ea15e7e8a..9356869397 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -2599,6 +2599,7 @@ window.egw_LAB.wait(function() { { $matches = null; $fields = explode(',',$GLOBALS['egw_info']['user']['preferences']['addressbook']['duplicate_fields']); + $threshold = (int)$GLOBALS['egw_info']['user']['preferences']['addressbook']['duplicate_threshold']; if (preg_match('/^exec\[([^\]]+)\]$/', $name, $matches)) $name = $matches[1]; // remove exec[ ] @@ -2631,7 +2632,7 @@ window.egw_LAB.wait(function() { $specified_count++; } } - if (in_array($name,$fields) && $specified_count >= 2) + if (in_array($name,$fields) && $specified_count >= $threshold) { $filter = array(); foreach($fields as $n) // use email too, to exclude obvious false positives