X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fexpression-functions.php;h=3aa8026953da4a850835eb16ce2523a65b60e0ba;hb=647822147615bad8572ad4282c9c3958fe983f5c;hp=12402a4ced7b2c9a46cfcac455e61a8305de65d0;hpb=20741b93fd58620af677a7f1039ffd16ea6ec689;p=mailer.git diff --git a/inc/expression-functions.php b/inc/expression-functions.php index 12402a4ced..3aa8026953 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -50,8 +50,8 @@ function replaceExpressionCode ($data, $replacer) { // 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])) { @@ -70,7 +70,7 @@ function isExpressionFunctionAvaiable ($data) { // 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 @@ -109,10 +109,12 @@ function doExpressionCode ($data) { // 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);