Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
1c8e2808
Commit
1c8e2808
authored
2 years ago
by
Eileen McNaughton
Browse files
Options
Downloads
Patches
Plain Diff
[Import] Remove empty if
parent
2bb4289c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Contact/Import/Parser/Contact.php
+0
-6
0 additions, 6 deletions
CRM/Contact/Import/Parser/Contact.php
CRM/Import/Parser.php
+0
-26
0 additions, 26 deletions
CRM/Import/Parser.php
with
0 additions
and
32 deletions
CRM/Contact/Import/Parser/Contact.php
+
0
−
6
View file @
1c8e2808
...
...
@@ -472,12 +472,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
// Support Match and Update Via Contact ID
if
(
$this
->
_updateWithId
&&
isset
(
$params
[
'id'
]))
{
$createNewContact
=
FALSE
;
// @todo - it feels like all the rows from here to the end of the IF
// could be removed in favour of a simple check for whether the contact_type & id match
$matchedIDs
=
$this
->
getIdsOfMatchingContacts
(
$formatted
);
if
(
!
empty
(
$matchedIDs
))
{
}
}
//fixed CRM-4148
...
...
This diff is collapsed.
Click to expand it.
CRM/Import/Parser.php
+
0
−
26
View file @
1c8e2808
...
...
@@ -1108,32 +1108,6 @@ abstract class CRM_Import_Parser {
return
$values
;
}
/**
* Get the ids of any contacts that match according to the rule.
*
* @param array $formatted
*
* @return array
*/
protected
function
getIdsOfMatchingContacts
(
array
$formatted
):
array
{
if
(
$formatted
[
'id'
]
??
NULL
)
{
return
[
$formatted
[
'id'
]];
}
// the call to the deprecated function seems to add no value other that to do an additional
// check for the contact_id & type.
$error
=
_civicrm_api3_deprecated_duplicate_formatted_contact
(
$formatted
);
if
(
!
CRM_Core_Error
::
isAPIError
(
$error
,
CRM_Core_ERROR
::
DUPLICATE_CONTACT
))
{
return
[];
}
if
(
is_array
(
$error
[
'error_message'
][
'params'
][
0
]))
{
return
$error
[
'error_message'
][
'params'
][
0
];
}
else
{
return
explode
(
','
,
$error
[
'error_message'
][
'params'
][
0
]);
}
}
/**
* Validate that the field requirements are met in the params.
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment