}
else {
$values[$activityID]['recipients'] = ts('(recipients)');
- $values[$activityID]['mailingId'] = '';
+ $values[$activityID]['mailingId'] = false;
if (
$accessCiviMail &&
($mailingIDs === TRUE || in_array($dao->source_record_id, $mailingIDs))
) {
- $values[$activityID]['mailingId'] = CRM_Utils_System::url('civicrm/mailing/report',
- "mid={$dao->source_record_id}&reset=1&cid={$dao->source_contact_id}&context=activitySelector"
- );
+ $values[$activityID]['mailingId'] = true;
}
}
}
}
if (isset($values['mailingId']) && !empty($values['mailingId'])) {
- $contactActivities[$activityId]['target_contact'] = CRM_Utils_System::href($values['recipients'], 'civicrm/mailing/report', "mid={$values['source_record_id']}&reset=1&cid={$values['source_contact_id']}&context=activitySelector");
+ $contactActivities[$activityId]['target_contact'] = CRM_Utils_System::href($values['recipients'], 'civicrm/mailing/report', "mid={$values['source_record_id']}&reset=1&cid={$params['contact_id']}&context=activitySelector");
}
elseif (CRM_Utils_Array::value('recipients', $values)) {
$contactActivities[$activityId]['target_contact'] = $values['recipients'];
$contactMailings[$mailingId]['subject'] = $values['subject'];
$contactMailings[$mailingId]['start_date'] = CRM_Utils_Date::customFormat($values['start_date']);
$contactMailings[$mailingId]['recipients'] = CRM_Utils_System::href(ts('(recipients)'), 'civicrm/mailing/report/event',
- "mid={$values['mailing_id']}&reset=1&cid={$values['creator_id']}&event=delivered&context=mailing");
+ "mid={$values['mailing_id']}&reset=1&cid={$params['contact_id']}&event=delivered&context=mailing");
$contactMailings[$mailingId]['mailing_creator'] = CRM_Utils_System::href(
$values['creator_name'],
'civicrm/contact/view',
CRM_Core_Action::BROWSE => array(
'name' => ts('Mailing Report'),
'url' => 'civicrm/mailing/report',
- 'qs' => "mid={$values['mailing_id']}&reset=1&cid={$values['creator_id']}&context=mailing",
+ 'qs' => "mid={$values['mailing_id']}&reset=1&cid={$params['contact_id']}&context=mailing",
'title' => ts('View Mailing Report'),
)
);