remove deprecated isLegacy check
authorSandor Semsey <sandor@es-progress.hu>
Wed, 14 Jun 2023 12:36:27 +0000 (14:36 +0200)
committerSandor Semsey <sandor@es-progress.hu>
Wed, 14 Jun 2023 12:36:27 +0000 (14:36 +0200)
ext/flexmailer/src/Listener/OpenTracker.php

index 1e0dc8460931e03a465b4c0ed6a761aa090959a3..00b5e0224f476e726be8d04740d5948dcd459d54 100644 (file)
@@ -24,20 +24,12 @@ class OpenTracker extends BaseListener {
       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" . '<img src="' . htmlentities($openUrl) . "\" width='1' height='1' alt='' border='0'>";
 
         $task->setMailParams($mailParams);