+2007-11-30 Oliver Hader <oh@inpublica.de>
+
+ * Fixed bug #5602: spamProtectEmailAddresses_atSubst is not recognized correctly
+
2007-11-30 Ingo Renner <ingo@typo3.org>
* added positioning function for the clear cache menu which is needed to keep the menu below it's icon when new items are added to the toolbar
*/
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;