Skip to content

Commit

Permalink
Merge pull request #14722 from JKingsnorth/fix-public-url-link-in-browse
Browse files Browse the repository at this point in the history
Fix public URL link with hashed URLs in mailing browse screen
  • Loading branch information
eileenmcnaughton authored Jul 14, 2019
2 parents a9edd33 + 9ed1c2e commit feeb080
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CRM/Mailing/Selector/Browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,17 +444,21 @@ 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=%%hashOrMid%%&reset=1',
'title' => ts('Public View'),
'fe' => TRUE,
];
$actionMask |= CRM_Core_Action::BROWSE;
}

$hash = CRM_Mailing_BAO_Mailing::getMailingHash($row['id']);
$rows[$key]['action'] = CRM_Core_Action::formLink(
$validLinks,
$actionMask,
['mid' => $row['id']],
[
'mid' => $row['id'],
'hashOrMid' => $hash ? $hash : $row['id'],
],
"more",
FALSE,
$opString,
Expand Down

0 comments on commit feeb080

Please sign in to comment.