From: Tim Otten Date: Wed, 13 May 2020 06:05:38 +0000 (-0700) Subject: Implement 'extern/open.php' as a regular route X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5ca340caf3c0c03e0fb63ed3143487d01cd683a4;p=civicrm-core.git Implement 'extern/open.php' as a regular route --- 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* +