Skip to content

Commit

Permalink
Merge pull request #29568 from jmcclelland/display-clicks-properly
Browse files Browse the repository at this point in the history
if no clicks, display 0 rather than empty string
  • Loading branch information
demeritcowboy authored Mar 2, 2024
2 parents 45ad879 + f19ae2d commit b3092bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CRM/Mailing/BAO/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2820,10 +2820,10 @@ public static function getContactMailingSelector(&$params) {
"mid={$values['mailing_id']}&reset=1&cid={$params['contact_id']}&event=queue&context=mailing");
$mailing['start_date'] = CRM_Utils_Date::customFormat($values['start_date']);
//CRM-12814
$mailing['openstats'] = "Opens: " .
CRM_Utils_Array::value($values['mailing_id'], $openCounts, 0) .
"<br />Clicks: " .
$clickCounts[$values['mailing_id']] ?? 0;
$clicks = $clickCounts[$values['mailing_id']] ?? 0;
$opens = $openCounts[$values['mailing_id']] ?? 0;
$mailing['openstats'] = ts('Opens: %1', [1 => $opens]) . '<br />' .
ts('Clicks: %1', [1 => $clicks]);

$actionLinks = [
CRM_Core_Action::VIEW => [
Expand Down

0 comments on commit b3092bb

Please sign in to comment.