Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] [Import] Remove unused parameter #23495

Merged
merged 1 commit into from
May 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions CRM/Contact/Import/Parser/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,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 @@ -724,7 +723,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 @@ -1906,7 +1905,6 @@ protected function setFieldMetadata() {

/**
* @param array $newContact
* @param $statusFieldName
* @param array $values
* @param int $onDuplicate
* @param array $formatted
Expand All @@ -1918,7 +1916,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