Merge pull request #43 from seamuslee001/normal_routing

Add in normal url routes for tracked opens and tracking urls to the m…
This commit is contained in:
Björn Endres 2020-09-07 09:28:15 +02:00 committed by GitHub
commit 911f9ec3d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -53,7 +53,9 @@ class CRM_Civiproxy_Mailer {
$proxy_base = CRM_Core_BAO_Setting::getItem('CiviProxy Settings', 'proxy_url'); $proxy_base = CRM_Core_BAO_Setting::getItem('CiviProxy Settings', 'proxy_url');
// General external functions // 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}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/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}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); $value = preg_replace("#{$system_base}civicrm/mosaico/img\?src=#i", $proxy_base.'/mosaico.php?id=', $value);

View File

@ -33,8 +33,8 @@ $target_civicrm = 'https://your.civicrm.installation.org';
// default paths, override if you want. Set to NULL to disable // default paths, override if you want. Set to NULL to disable
$target_rest = $target_civicrm . '/sites/all/modules/civicrm/extern/rest.php'; $target_rest = $target_civicrm . '/sites/all/modules/civicrm/extern/rest.php';
$target_url = $target_civicrm . '/sites/all/modules/civicrm/extern/url.php'; $target_url = $target_civicrm . '/civicrm/mailing/url';
$target_open = $target_civicrm . '/sites/all/modules/civicrm/extern/open.php'; $target_open = $target_civicrm . '/civicrm/mailing/open';
$target_file = $target_civicrm . '/sites/default/files/civicrm/persist/'; $target_file = $target_civicrm . '/sites/default/files/civicrm/persist/';
$target_mosaico = NULL; // (disabled by default): $target_civicrm . '/civicrm/mosaico/img?src='; $target_mosaico = NULL; // (disabled by default): $target_civicrm . '/civicrm/mosaico/img?src=';
$target_mail_view = $target_civicrm . '/civicrm/mailing/view'; $target_mail_view = $target_civicrm . '/civicrm/mailing/view';