]> git.mxchange.org Git - mailer.git/blobdiff - inc/expression-functions.php
New template helper function doTemplateExtensionRegistrationLink() introduced
[mailer.git] / inc / expression-functions.php
index b5f92fc07d316dc7501709d4595ecc50fa0b2d00..9f309b9d86ab1308b8d190cb315e1aedf82e828d 100644 (file)
@@ -303,7 +303,16 @@ function doExpressionMessage ($data) {
 function doExpressionTemplate ($data) {
        // Do the replacement
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template='.$GLOBALS['current_template']);
-       $replacer = '{DQUOTE} . doTemplate' . $data['callback'] . "('" . $GLOBALS['current_template'] . "', true) . {DQUOTE}";
+       $replacer = '{DQUOTE} . doTemplate' . $data['callback'] . "('" . $GLOBALS['current_template'] . "', true";
+
+       // Is 'value' set?
+       if (!empty($data['value'])) {
+               // Then include it as well
+               $replacer .= ", '" . $data['value'] . "'";
+       } // END - if
+
+       // Replacer is ready
+       $replacer .= ') . {DQUOTE}';
 
        // Replace the code
        $code = replaceExpressionCode($data, $replacer);