POC - hook works

This commit is contained in:
systopia 2015-01-27 00:50:09 +01:00
parent 3046aa1d4e
commit e40321b17d
2 changed files with 8 additions and 2 deletions

View File

@ -6,7 +6,13 @@ require_once 'civiproxy.civix.php';
* POC email
*/
function civiproxy_civicrm_alterMailParams( &$params, $context ) {
error_log(print_r($params,1));
foreach (array('html', 'text') as $key) {
$value = $params[$key];
$value = str_replace('http://localhost:8888/mh/sites/all/modules/civicrm/extern/url.php', 'http://localhost:8888/proxy/url.php', $value);
$value = str_replace('http://localhost:8888/mh/sites/all/modules/civicrm/extern/open.php', 'http://localhost:8888/proxy/open.php', $value);
$value = str_replace('http://localhost:8888/mh/sites/default/files/civicrm/persist', 'http://localhost:8888/proxy/file.php?q=', $value);
$params[$key] = $value;
}
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<extension key="de.systopia.civiproxy" type="module">
<file>civiproxy</file>
<name>FIXME</name>
<name>CiviProxy</name>
<description>FIXME</description>
<license>FIXME</license>
<maintainer>