diff --git a/ext/flexmailer/src/Listener/OpenTracker.php b/ext/flexmailer/src/Listener/OpenTracker.php index 1e0dc8460931..75c9c4e0efdb 100644 --- a/ext/flexmailer/src/Listener/OpenTracker.php +++ b/ext/flexmailer/src/Listener/OpenTracker.php @@ -24,20 +24,12 @@ public function onCompose(ComposeBatchEvent $e) { return; } - $config = \CRM_Core_Config::singleton(); - - // TODO: After v5.21 goes EOL, remove the $isLegacy check. - $isLegacy = version_compare(\CRM_Utils_System::version(), '5.23.alpha', '<'); - foreach ($e->getTasks() as $task) { /** @var \Civi\FlexMailer\FlexMailerTask $task */ $mailParams = $task->getMailParams(); if (!empty($mailParams) && !empty($mailParams['html'])) { - $openUrl = $isLegacy - ? $config->userFrameworkResourceURL . "extern/open.php?q=" . $task->getEventQueueId() - : \CRM_Utils_System::externUrl('extern/open', "q=" . $task->getEventQueueId()); - + $openUrl = \CRM_Utils_System::externUrl('extern/open', 'q=' . $task->getEventQueueId()); $mailParams['html'] .= "\n" . '"; $task->setMailParams($mailParams);