diff --git a/de.systopia.civiproxy/CRM/Civiproxy/Mailer.php b/de.systopia.civiproxy/CRM/Civiproxy/Mailer.php index bdff057..6c37379 100644 --- a/de.systopia.civiproxy/CRM/Civiproxy/Mailer.php +++ b/de.systopia.civiproxy/CRM/Civiproxy/Mailer.php @@ -53,7 +53,9 @@ class CRM_Civiproxy_Mailer { $proxy_base = CRM_Core_BAO_Setting::getItem('CiviProxy Settings', 'proxy_url'); // General external functions + $value = preg_replace("#{$system_base}civicrm/mailing/url#i", $proxy_base.'/url.php', $value); $value = preg_replace("#{$system_base}sites/all/modules/civicrm/extern/url.php#i", $proxy_base.'/url.php', $value); + $value = preg_replace("#{$system_base}civicrm/mailing/open#i", $proxy_base.'/open.php', $value); $value = preg_replace("#{$system_base}sites/all/modules/civicrm/extern/open.php#i", $proxy_base.'/open.php', $value); $value = preg_replace("#{$system_base}sites/default/files/civicrm/persist/#i", $proxy_base.'/file.php?id=', $value); $value = preg_replace("#{$system_base}civicrm/mosaico/img\?src=#i", $proxy_base.'/mosaico.php?id=', $value); diff --git a/proxy/config.dist.php b/proxy/config.dist.php index 59510bb..631facd 100644 --- a/proxy/config.dist.php +++ b/proxy/config.dist.php @@ -33,11 +33,16 @@ $target_civicrm = 'https://your.civicrm.installation.org'; // default paths, override if you want. Set to NULL to disable $target_rest = $target_civicrm . '/sites/all/modules/civicrm/extern/rest.php'; -$target_url = $target_civicrm . '/sites/all/modules/civicrm/extern/url.php'; -$target_open = $target_civicrm . '/sites/all/modules/civicrm/extern/open.php'; $target_file = $target_civicrm . '/sites/default/files/civicrm/persist/'; $target_mosaico = NULL; // (disabled by default): $target_civicrm . '/civicrm/mosaico/img?src='; $target_mail_view = $target_civicrm . '/civicrm/mailing/view'; +$target_url = $target_civicrm . '/civicrm/mailing/url'; +$target_open = $target_civicrm . '/civicrm/mailing/open'; + +// CAUTION: use the following for CiviCRM < 5.27 +$target_url = $target_civicrm . '/sites/all/modules/civicrm/extern/url.php'; +$target_open = $target_civicrm . '/sites/all/modules/civicrm/extern/open.php'; + /**************************************************************** ** GENERAL OPTIONS ** @@ -155,4 +160,4 @@ $_webhook2api = [ "parameter_sanitation" => [], ] ] -]; \ No newline at end of file +];