Commit feeb0800 authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub

Merge pull request #14722 from JKingsnorth/fix-public-url-link-in-browse

Fix public URL link with hashed URLs in mailing browse screen
parents a9edd337 9ed1c2ed
......@@ -444,17 +444,21 @@ LEFT JOIN civicrm_contact scheduledContact ON ( $mailing.scheduled_id = schedul
$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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment