X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FImport%2FParser.php;h=738254e5c1898605fbecd18511c7b351e7923840;hb=ca2057ea8c50d7ef19be5bfe95b31189593409e4;hp=7791b129a9ad7cb5b97a0931355e2fe48d5eb2a8;hpb=648631cd94799e87fe2347487d465b1a7256aa57;p=civicrm-core.git diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index 7791b129a9..738254e5c1 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -34,7 +34,7 @@ abstract class CRM_Import_Parser { /** * Settings */ - const MAX_ERRORS = 250, MAX_WARNINGS = 25, DEFAULT_TIMEOUT = 30; + const MAX_WARNINGS = 25, DEFAULT_TIMEOUT = 30; /** * Return codes @@ -79,11 +79,6 @@ abstract class CRM_Import_Parser { */ protected $_maxLinesToProcess; - /** - * Maximum number of invalid rows to store - */ - protected $_maxErrorCount; - /** * Array of error lines, bounded by MAX_ERROR */ @@ -192,7 +187,6 @@ abstract class CRM_Import_Parser { */ public function __construct() { $this->_maxLinesToProcess = 0; - $this->_maxErrorCount = self::MAX_ERRORS; } /** @@ -444,4 +438,20 @@ abstract class CRM_Import_Parser { return $fileName; } + /** + * Check if contact is a duplicate . + * + * @param array $formatValues + * + * @return array + */ + protected function checkContactDuplicate(&$formatValues) { + //retrieve contact id using contact dedupe rule + $formatValues['contact_type'] = $this->_contactType; + $formatValues['version'] = 3; + require_once 'CRM/Utils/DeprecatedUtils.php'; + $error = _civicrm_api3_deprecated_check_contact_dedupe($formatValues); + return $error; + } + }