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
36f871a8
Unverified
Commit
36f871a8
authored
2 years ago
by
Monish Deb
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #23559 from eileenmcnaughton/import_yay
Another always-true-if
parents
dd9e108b
ffb2a411
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Contact/Import/Parser/Contact.php
+1
-5
1 addition, 5 deletions
CRM/Contact/Import/Parser/Contact.php
with
1 addition
and
5 deletions
CRM/Contact/Import/Parser/Contact.php
+
1
−
5
View file @
36f871a8
...
...
@@ -311,8 +311,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
//format common data, CRM-4062
$this
->
formatCommonData
(
$params
,
$formatted
,
$contactFields
);
$relationship
=
FALSE
;
//fixed CRM-4148
//now we create new contact in update/fill mode also.
$contactID
=
NULL
;
...
...
@@ -325,7 +323,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
}
if
(
isset
(
$newContact
)
&&
is_object
(
$newContact
)
&&
(
$newContact
instanceof
CRM_Contact_BAO_Contact
))
{
$relationship
=
TRUE
;
$newContact
=
clone
(
$newContact
);
$contactID
=
$newContact
->
id
;
$this
->
_newContacts
[]
=
$contactID
;
...
...
@@ -344,7 +341,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
return
CRM_Import_Parser
::
DUPLICATE
;
}
$relationship
=
TRUE
;
// CRM-10433/CRM-20739 - IDs could be string or array; handle accordingly
if
(
!
is_array
(
$dupeContactIDs
=
$newContact
[
'error_message'
][
'params'
][
0
]))
{
$dupeContactIDs
=
explode
(
','
,
$dupeContactIDs
);
...
...
@@ -376,7 +372,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
CRM_Utils_Hook
::
import
(
'Contact'
,
'process'
,
$this
,
$hookParams
);
}
if
(
$relationship
)
{
if
(
1
)
{
$primaryContactId
=
NULL
;
if
(
CRM_Core_Error
::
isAPIError
(
$newContact
,
CRM_Core_ERROR
::
DUPLICATE_CONTACT
))
{
if
(
$dupeCount
==
1
&&
CRM_Utils_Rule
::
integer
(
$contactID
))
{
...
...
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