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
b561230a
Commit
b561230a
authored
11 years ago
by
lobo
Browse files
Options
Downloads
Patches
Plain Diff
CRM-13716 - MailingJob still uses civicrm_activity_target (for multiple bulk emails)
http://issues.civicrm.org/jira/browse/CRM-13716
parent
d2148ec6
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/Mailing/BAO/MailingJob.php
+13
-1
13 additions, 1 deletion
CRM/Mailing/BAO/MailingJob.php
with
13 additions
and
1 deletion
CRM/Mailing/BAO/MailingJob.php
+
13
−
1
View file @
b561230a
...
...
@@ -935,9 +935,21 @@ AND civicrm_activity.source_record_id = %2
// CRM-9519
if
(
CRM_Core_BAO_Email
::
isMultipleBulkMail
())
{
static
$targetRecordID
=
NULL
;
if
(
!
$targetRecordID
)
{
$activityContacts
=
CRM_Core_OptionGroup
::
values
(
'activity_contacts'
,
FALSE
,
FALSE
,
FALSE
,
NULL
,
'name'
);
$targetRecordID
=
CRM_Utils_Array
::
key
(
'Activity Targets'
,
$activityContacts
);
}
// make sure we don't attempt to duplicate the target activity
foreach
(
$activity
[
'target_contact_id'
]
as
$key
=>
$targetID
)
{
$sql
=
"SELECT id FROM civicrm_activity_target WHERE activity_id =
$activityID
AND target_contact_id =
$targetID
;"
;
$sql
=
"
SELECT id
FROM civicrm_activity_contact
WHERE activity_id =
$activityID
AND contact_id =
$targetID
AND record_type_id =
$targetRecordID
"
;
if
(
CRM_Core_DAO
::
singleValueQuery
(
$sql
))
{
unset
(
$activity
[
'target_contact_id'
][
$key
]);
}
...
...
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