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
d8a22375
Commit
d8a22375
authored
11 years ago
by
lcdweb
Browse files
Options
Downloads
Patches
Plain Diff
CRM-13812 retain trashed contacts in activity selector and apply visual indicator
parent
34188532
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Activity/BAO/Activity.php
+11
-6
11 additions, 6 deletions
CRM/Activity/BAO/Activity.php
with
11 additions
and
6 deletions
CRM/Activity/BAO/Activity.php
+
11
−
6
View file @
d8a22375
...
...
@@ -760,23 +760,22 @@ LEFT JOIN civicrm_case_activity ON ( civicrm_case_activity.activity_id = tbl.ac
// create temp table for target contacts
$activityContactTempTable
=
"civicrm_temp_activity_contact_
{
$randomNum
}
"
;
$query
=
"CREATE TEMPORARY TABLE
{
$activityContactTempTable
}
(
activity_id int unsigned, contact_id int unsigned, record_type_id varchar(16), contact_name varchar(255) )
activity_id int unsigned, contact_id int unsigned, record_type_id varchar(16), contact_name varchar(255)
, is_deleted int unsigned
)
ENGINE=MYISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci"
;
CRM_Core_DAO
::
executeQuery
(
$query
);
// note that we ignore bulk email for targets, since we don't show it in selector
$query
=
"
INSERT INTO
{
$activityContactTempTable
}
( activity_id, contact_id, record_type_id, contact_name )
INSERT INTO
{
$activityContactTempTable
}
( activity_id, contact_id, record_type_id, contact_name
, is_deleted
)
SELECT ac.activity_id,
ac.contact_id,
ac.record_type_id,
c.sort_name
c.sort_name,
c.is_deleted
FROM civicrm_activity_contact ac
INNER JOIN
{
$activityTempTable
}
ON ( ac.activity_id =
{
$activityTempTable
}
.activity_id )
INNER JOIN civicrm_contact c ON c.id = ac.contact_id
WHERE c.is_deleted = 0
"
;
CRM_Core_DAO
::
executeQuery
(
$query
);
...
...
@@ -786,7 +785,8 @@ WHERE c.is_deleted = 0
SELECT
{
$activityTempTable
}
.*,
{
$activityContactTempTable
}
.contact_id,
{
$activityContactTempTable
}
.record_type_id,
{
$activityContactTempTable
}
.contact_name
{
$activityContactTempTable
}
.contact_name,
{
$activityContactTempTable
}
.is_deleted
FROM
{
$activityTempTable
}
INNER JOIN
{
$activityContactTempTable
}
on
{
$activityTempTable
}
.activity_id =
{
$activityContactTempTable
}
.activity_id
ORDER BY fixed_sort_order
...
...
@@ -836,6 +836,11 @@ ORDER BY fixed_sort_order
$values
[
$activityID
][
'target_contact_name'
]
=
array
();
}
// if deleted, wrap in <del>
if
(
$dao
->
is_deleted
)
{
$dao
->
contact_name
=
"<del>
{
$dao
->
contact_name
}
</dao>"
;
}
if
(
$dao
->
record_type_id
==
$sourceID
&&
$dao
->
contact_id
)
{
$values
[
$activityID
][
'source_contact_id'
]
=
$dao
->
contact_id
;
$values
[
$activityID
][
'source_contact_name'
]
=
$dao
->
contact_name
;
...
...
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