Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
justinfreeman (Agileware)
Core
Commits
55033e60
Commit
55033e60
authored
11 years ago
by
pratik.joshi
Browse files
Options
Downloads
Patches
Plain Diff
CRM-12726 : applied patch and did some modifications
parent
e98157df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Contact/BAO/Contact.php
+14
-2
14 additions, 2 deletions
CRM/Contact/BAO/Contact.php
with
14 additions
and
2 deletions
CRM/Contact/BAO/Contact.php
+
14
−
2
View file @
55033e60
...
...
@@ -772,19 +772,31 @@ WHERE civicrm_contact.id = " . CRM_Utils_Type::escape($id, 'Integer');
$logDAO
->
entity_table
=
'civicrm_contact'
;
$logDAO
->
entity_id
=
$id
;
$logDAO
->
delete
();
// delete contact participants CRM-12155
CRM_Event_BAO_Participant
::
deleteContactParticipant
(
$id
);
// delete contact contributions CRM-12155
CRM_Contribute_BAO_Contribution
::
deleteContactContribution
(
$id
);
// do activity cleanup, CRM-5604
CRM_Activity_BAO_Activity
::
cleanupActivity
(
$id
);
// delete all notes related to contact
CRM_Core_BAO_Note
::
cleanContactNotes
(
$id
);
// delete cases related to contact
$contactCases
=
CRM_Case_BAO_Case
::
retrieveCaseIdsByContactId
(
$id
);
if
(
!
empty
(
$contactCases
))
{
foreach
(
$contactCases
as
$caseId
){
//check if case is associate with other contact or not.
$caseContactId
=
CRM_Case_BAO_Case
::
getCaseClients
(
$caseId
);
if
(
count
(
$caseContactId
)
<=
1
){
CRM_Case_BAO_Case
::
deleteCase
(
$caseId
);
}
}
}
$contact
->
delete
();
}
else
{
...
...
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