Project

General

Profile

Bug #17294 ยป 0005602.patch

Administrator Admin, 2007-05-12 11:35

View differences:

typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie)
*/
function getMailTo($mailAddress,$linktxt,$initP='?') {
if(!strcmp($linktxt,'')) { $linktxt = $mailAddress; }
$linktxtIsMailAddress = ($linktxt == $mailAddress ? true : false);
$mailToUrl = 'mailto:'.$mailAddress;
......
if ($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_atSubst']) {
$atLabel = trim($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_atSubst']);
}
if ($linktxtIsMailAddress) {
$linktxt = str_replace('@',$atLabel?$atLabel:'(at)',$linktxt);
}
$spamProtectedMailAddress = str_replace('@', ($atLabel ? $atLabel : '(at)'), $mailAddress);
if ($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_lastDotSubst']) {
$lastDotLabel = trim($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_lastDotSubst']);
$lastDotLabel = $lastDotLabel ? $lastDotLabel : '(dot)';
if ($linktxtIsMailAddress) {
$linktxt = preg_replace('/\.([^\.]+)$/', $lastDotLabel.'$1', $linktxt);
}
$spamProtectedMailAddress = preg_replace('/\.([^\.]+)$/', $lastDotLabel.'$1', $spamProtectedMailAddress);
}
$linktxt = str_replace($mailAddress, $spamProtectedMailAddress, $linktxt);
}
} else {
$mailToUrl = $GLOBALS['TSFE']->absRefPrefix.$GLOBALS['TSFE']->config['mainScript'].$initP.'&jumpurl='.rawurlencode($mailToUrl).$GLOBALS['TSFE']->getMethodUrlIdToken;
    (1-1/1)