Skip to content

Commit

Permalink
Fix public URL link with hashed URLs in mailing browse screen
Browse files Browse the repository at this point in the history
  • Loading branch information
JKingsnorth committed Jul 3, 2019
1 parent 950468d commit 98b1a59
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CRM/Mailing/Selector/Browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) {
$validLinks[CRM_Core_Action::BROWSE] = [
'name' => ts('Public View'),
'url' => 'civicrm/mailing/view',
'qs' => 'id=%%mid%%&reset=1',
'qs' => 'id=%%midOrHash%%&reset=1',
'title' => ts('Public View'),
'fe' => TRUE,
];
Expand All @@ -454,7 +454,10 @@ public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) {
$rows[$key]['action'] = CRM_Core_Action::formLink(
$validLinks,
$actionMask,
['mid' => $row['id']],
[
'mid' => $row['id'],
'midOrHash' => CRM_Mailing_BAO_Mailing::getMailingHash($row['id']) ? CRM_Mailing_BAO_Mailing::getMailingHash($row['id']) : $row['id'],
],
"more",
FALSE,
$opString,
Expand Down

0 comments on commit 98b1a59

Please sign in to comment.