Skip to content

Commit

Permalink
Merge pull request #23495 from eileenmcnaughton/import_unused
Browse files Browse the repository at this point in the history
[REF] [Import] Remove unused parameter
  • Loading branch information
demeritcowboy authored May 19, 2022
2 parents 2df31a2 + 970facd commit 366173b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CRM/Contact/Import/Parser/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ public function import($onDuplicate, &$values) {
// first make sure this is a valid line
//$this->_updateWithId = false;
$response = $this->summary($values);
$statusFieldName = $this->_statusFieldName;

if ($response != CRM_Import_Parser::VALID) {
$this->setImportStatus((int) $values[count($values) - 1], 'Invalid', "Invalid (Error Code: $response)");
Expand Down Expand Up @@ -717,7 +716,7 @@ public function import($onDuplicate, &$values) {
$code = NULL;

if (($code = CRM_Utils_Array::value('code', $newContact['error_message'])) && ($code == CRM_Core_Error::DUPLICATE_CONTACT)) {
return $this->handleDuplicateError($newContact, $statusFieldName, $values, $onDuplicate, $formatted, $contactFields);
return $this->handleDuplicateError($newContact, $values, $onDuplicate, $formatted, $contactFields);
}
// Not a dupe, so we had an error
$errorMessage = $newContact['error_message'];
Expand Down Expand Up @@ -1888,7 +1887,6 @@ protected function setFieldMetadata() {

/**
* @param array $newContact
* @param $statusFieldName
* @param array $values
* @param int $onDuplicate
* @param array $formatted
Expand All @@ -1900,7 +1898,7 @@ protected function setFieldMetadata() {
* @throws \CiviCRM_API3_Exception
* @throws \Civi\API\Exception\UnauthorizedException
*/
protected function handleDuplicateError(array $newContact, $statusFieldName, array $values, int $onDuplicate, array $formatted, array $contactFields): int {
private function handleDuplicateError(array $newContact, array $values, int $onDuplicate, array $formatted, array $contactFields): int {
$urls = [];
// need to fix at some stage and decide if the error will return an
// array or string, crude hack for now
Expand Down

0 comments on commit 366173b

Please sign in to comment.