* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
// Private function to determine wether we have a special expression function avaible
// (mostly located in wrapper-functions.php)
function isExpressionFunctionAvaiable ($data) {
- // Get the enty we need
- $entry = $data['matches'][4][$data['key']];
+ // Get the enty we need and trim it
+ $entry = trim($data['matches'][4][$data['key']]);
// Do we have cache?
if (!isset($GLOBALS['expression_function_available'][$entry])) {
// Is that function there?
if (function_exists($functionName)) {
// Cache it all
- $GLOBALS['expression_function_name'][$entry] = $functionName;
+ $GLOBALS['expression_function_name'][$entry] = $functionName;
$GLOBALS['expression_function_available'][$entry] = true;
} else {
// Not avaiable
// Expression call-back function for URLs
function doExpressionUrl ($data) {
// Do we have JS-mode?
- if ($data['callback'] == 'js') $data['mode'] = 1;
+ if ($data['callback'] == 'js') {
+ $data['output_mode'] = 1;
+ } // END - if
// Handle an URL here
- $replacer = "{DQUOTE} . encodeUrl('" . $data['matches'][4][$data['key']] . "', " . $data['mode'] . ') . {DQUOTE}';
+ $replacer = "{DQUOTE} . encodeUrl('" . $data['matches'][4][$data['key']] . "', " . $data['output_mode'] . ') . {DQUOTE}';
// Replace it
$code = replaceExpressionCode($data, $replacer);