From cbed6fe55c0cf821cd7feaf7283cf81260bdc1ad Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 12 May 2020 15:04:41 -0700 Subject: [PATCH] TrackableURL - Re-enable caching --- CRM/Mailing/BAO/TrackableURL.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Mailing/BAO/TrackableURL.php b/CRM/Mailing/BAO/TrackableURL.php index 86650e3afe..0113e53bb9 100644 --- a/CRM/Mailing/BAO/TrackableURL.php +++ b/CRM/Mailing/BAO/TrackableURL.php @@ -76,7 +76,9 @@ class CRM_Mailing_BAO_TrackableURL extends CRM_Mailing_DAO_TrackableURL { $urlCache[$mailing_id . $url] = $redirect; } - $returnUrl = CRM_Utils_System::externUrl('extern/url', "u=$id&qid=$queue_id"); + // This looks silly - calling the hook twice. This smells like an accident. Restoring old cache-based lookup. + // $returnUrl = CRM_Utils_System::externUrl('extern/url', "u=$id&qid=$queue_id"); + $returnUrl = "{$urlCache[$mailing_id . $url]}&qid={$queue_id}"; if ($hrefExists) { $returnUrl = "href='{$returnUrl}' rel='nofollow'"; -- 2.25.1