]> git.mxchange.org Git - mailer.git/blobdiff - inc/expression-functions.php
Now CSS classes are being inserted by EL
[mailer.git] / inc / expression-functions.php
index dffef73d05b47791423549eb9052e1ef2a1e721c..6a7ca12bf646bc544057143089c288999cef0b58 100644 (file)
@@ -99,9 +99,9 @@ function doExpressionUser ($data) {
                if ($data['matches'][4][$data['key']] == '$userid') {
                        // Use dynamic call
                        $functionName = "getFetchedUserData('userid', \$userid, '" . $data['callback'] . "')";
-               } elseif ($data['matches'][4][$data['key']] > 0) {
+               } elseif (!empty($data['matches'][4][$data['key']])) {
                        // User data found
-                       $functionName = "getFetchedUserData('userid', " . $data['matches'][4][$data['key']] . ", " . $data['callback'] . "')";
+                       $functionName = "getFetchedUserData('userid', " . $data['matches'][4][$data['key']] . ", '" . $data['callback'] . "')";
                }
        } elseif ((!empty($data['callback'])) && (isUserDataValid())) {
                // "Call-back" alias column for current logged in user's data
@@ -152,13 +152,7 @@ function doExpressionExt ($data) {
 // @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again
 function doExpressionConfig ($data) {
        // Default replacer is the config value itself
-       $replacer = '{DQUOTE} . getConfig(' . "'" . $data['matches'][4][$data['key']] . "'" . ') . {DQUOTE}';
-
-       // Is there a call-back function provided?
-       if (!empty($data['callback'])) {
-               // Construct a new expression
-               $replacer = '{%pipe,' . $data['callback'] . ',' . $configValue . '%}';
-       } // END - if
+       $replacer = '{DQUOTE}  . ' . $data['callback'] . '(getConfig(' . "'" . $data['matches'][4][$data['key']] . "'" . ')) . {DQUOTE}';
 
        // Replace the config entry
        $code = replaceExpressionCode($data, $replacer);
@@ -227,7 +221,7 @@ function doExpressionValidatorLinks ($data) {
 // Expression call-back for dynamic messages
 function doExpressionMessage ($data) {
        // Message string replacement depends on if message is masked
-       if (isMessageMasked($data['callback'])) {
+       if ((isMessageMasked($data['callback'])) && ((!empty($data['extra_func'])) || ($data['extra_func'] == '0'))) {
                // Message should be masked
                $replacer = "{DQUOTE} . getMaskedMessage('" . $data['callback'] . "', '" . $data['extra_func'] . "') . {DQUOTE}";
        } else {