Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
Activity Profile
Commits
ec3500a0
Commit
ec3500a0
authored
May 12, 2022
by
bgm
Browse files
Merge branch 'master' of lab.civicrm.org:extensions/activityprofile
parents
0ed27947
3b73bf8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
CRM/Activityprofile/APIWrappers/Profile.php
View file @
ec3500a0
...
...
@@ -146,6 +146,11 @@ class CRM_Activityprofile_APIWrappers_Profile {
'subject'
=>
$title
,
]);
// [ML] see also patch in remoteform.js to escape newlines on submit
if
(
!
empty
(
$apiRequest
[
'params'
][
'activity_details'
])
&&
strpos
(
$apiRequest
[
'params'
][
'activity_details'
],
'<'
)
===
FALSE
)
{
$apiRequest
[
'params'
][
'activity_details'
]
=
nl2br
(
$apiRequest
[
'params'
][
'activity_details'
]);
}
$apiRequest
[
'params'
][
'activity_id'
]
=
$activity
[
'id'
];
return
$apiRequest
;
}
...
...
activityprofile.php
View file @
ec3500a0
...
...
@@ -187,6 +187,17 @@ function activityprofile_civicrm_post($op, $objectName, $objectId, &$objectRef)
2
=>
[
$activity_type_id
,
'Positive'
],
]);
}
// If notifications are enable, send the email
// Copied from CRM/Profile/Form.php
if
(
$notify
=
CRM_Core_DAO
::
getFieldValue
(
'CRM_Core_DAO_UFGroup'
,
$profile_id
,
'notify'
))
{
$contact_id
=
CRM_Core_DAO
::
singleValueQuery
(
'SELECT contact_id FROM civicrm_activity_contact WHERE activity_id = %1'
,
[
1
=>
[
$objectRef
->
id
,
'Positive'
],
]);
// @todo Lookup the labels for the keys of the $data['params'] so that the email displays the labels?
$values
=
[
'id'
=>
$profile_id
,
'values'
=>
$data
[
'params'
],
'email'
=>
$notify
];
CRM_Core_BAO_UFGroup
::
commonSendMail
(
$contact_id
,
$values
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment