]> git.mxchange.org Git - mailer.git/blobdiff - inc/expression-functions.php
Opps ...
[mailer.git] / inc / expression-functions.php
index 12402a4ced7b2c9a46cfcac455e61a8305de65d0..3aa8026953da4a850835eb16ce2523a65b60e0ba 100644 (file)
@@ -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);