From ecbf179fbb1d6b0bccf5e7cd6b9c72337ac2203d Mon Sep 17 00:00:00 2001 From: systopia Date: Fri, 17 Nov 2017 14:05:15 +0100 Subject: [PATCH] make mosaico static mail work (#7) --- proxy/proxy.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/proxy/proxy.php b/proxy/proxy.php index 47d59ce..67bd4d2 100644 --- a/proxy/proxy.php +++ b/proxy/proxy.php @@ -100,19 +100,22 @@ function civiproxy_mend_URLs(&$string) { global $target_rest, $target_url, $target_open, $target_file, $target_mail, $proxy_base; if ($target_rest) { - $string = preg_replace("#$target_rest#", $proxy_base . '/rest.php', $string); + $string = preg_replace("#{$target_rest}#", $proxy_base . '/rest.php', $string); } if ($target_url) { - $string = preg_replace("#$target_url#", $proxy_base . '/url.php', $string); + $string = preg_replace("#{$target_url}#", $proxy_base . '/url.php', $string); } if ($target_open) { - $string = preg_replace("#$target_open#", $proxy_base . '/open.php', $string); + $string = preg_replace("#{$target_open}#", $proxy_base . '/open.php', $string); } if ($target_mail) { - $string = preg_replace("#$target_mail#", $proxy_base . '/mail.php', $string); + $string = preg_replace("#{$target_mail}#", $proxy_base . '/mail.php', $string); } if ($target_file) { - $string = preg_replace("#$target_file#", $proxy_base . '/file.php?id=', $string); + $string = preg_replace("#{$target_file}#", $proxy_base . '/file.php?id=', $string); + } + if ($target_mosaico) { + $string = preg_replace("#{$target_mosaico}#", $proxy_base . '/mosaico.php?id=', $string); } }