Skip to content

Commit

Permalink
Minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Jan 15, 2019
1 parent 83ac695 commit 88ffa61
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions includes/wf_crm_webform_postprocess.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1423,16 +1423,10 @@ class wf_crm_webform_postprocess extends wf_crm_webform_base {
}
}
if ($mail) {
$caseId = (isset($params['case_id'])) ? $params['case_id'] : NULL;
$caseId = isset($params['case_id']) ? $params['case_id'] : NULL;
$caseClientId = $caseId ? CRM_Utils_Array::first(CRM_Case_BAO_Case::getCaseClients($caseId)) : NULL;
// Include attachments while sending a copy of activity.
$attachments = CRM_Core_BAO_File::getEntityFile('civicrm_activity', $activity['id']);
$caseClientId = NULL;
if ($caseId) {
$caseClients = CRM_Case_BAO_Case::getCaseClients($caseId);
if (count($caseClients) > 0) {
$caseClientId = $caseClients[0];
}
}
CRM_Case_BAO_Case::sendActivityCopy($caseClientId, $activity['id'], $mail, $attachments, $caseId);
}
}
Expand Down

0 comments on commit 88ffa61

Please sign in to comment.