From 5ca340caf3c0c03e0fb63ed3143487d01cd683a4 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 12 May 2020 23:05:38 -0700 Subject: [PATCH] Implement 'extern/open.php' as a regular route --- CRM/Mailing/Page/Open.php | 58 ++++++++++++++++++++++++++++++++ CRM/Mailing/xml/Menu/Mailing.xml | 5 +++ 2 files changed, 63 insertions(+) create mode 100644 CRM/Mailing/Page/Open.php diff --git a/CRM/Mailing/Page/Open.php b/CRM/Mailing/Page/Open.php new file mode 100644 index 0000000000..ac26fbfff8 --- /dev/null +++ b/CRM/Mailing/Page/Open.php @@ -0,0 +1,58 @@ +getPath('[civicrm.root]/i/tracker.gif'); + + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Content-Description: File Transfer'); + header('Content-type: image/gif'); + header('Content-Length: ' . filesize($filename)); + header('Content-Disposition: inline; filename=tracker.gif'); + + readfile($filename); + + CRM_Utils_System::civiExit(); + } + +} diff --git a/CRM/Mailing/xml/Menu/Mailing.xml b/CRM/Mailing/xml/Menu/Mailing.xml index 7fea1938a4..d4cc7d274a 100644 --- a/CRM/Mailing/xml/Menu/Mailing.xml +++ b/CRM/Mailing/xml/Menu/Mailing.xml @@ -207,4 +207,9 @@ CRM_Mailing_Page_Url *always allow* + + civicrm/mailing/open + CRM_Mailing_Page_Open + *always allow* + -- 2.25.1