]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
Missing template added, fixed loadEmailTemplate() if templte was not found and debug...
[mailer.git] / inc / template-functions.php
index f2ee3db151f1033477ae58616e07e930090b505b..9f84147c1bbbfbbc0b5dab54e05ba4475bbb1e4f 100644 (file)
@@ -536,7 +536,7 @@ function loadEmailTemplate ($template, $content = array(), $userid = NULL, $load
        // Are there some content?
        if (empty($newContent)) {
                // Compiling failed
-               $newContent = "Compiler error for template " . $template . " !\nUncompiled content:\n" . $GLOBALS['template_content']['email'][$template];
+               $newContent = "Compiler error for template " . $template . " !\nUncompiled content:\n" . $GLOBALS['template_eval']['email'][$template];
 
                // Add last error if the required function exists
                if (function_exists('error_get_last')) {
@@ -1363,14 +1363,15 @@ function compileUriCode ($code, $simple = TRUE) {
        // Compile constants
        if ($simple === FALSE) {
                // Add more 'from'
-               array_push($charsCompile['from'], '{--', '--}');
+               array_unshift($charsCompile['from'], '{--', '--}');
 
                // Add more 'to'
-               array_push($charsCompile['to'], '".', '."');
+               array_unshift($charsCompile['to'], '".', '."');
        } // END - if
 
        // Compile QUOT and other non-HTML codes
-       $code = str_replace($charsCompile['from'], $charsCompile['to'], $code);
+       $code = str_replace($charsCompile['from'], $charsCompile['to'], decodeEntities($code));
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'code=' . $code);
 
        // Return compiled code
        return $code;
@@ -2074,7 +2075,7 @@ function doTemplateExtensionRegistrationLink ($templateName, $clear, $ext_name)
                $OUT = '<span title="{--ADMIN_EXTENSION_IS_DEPRECATED_TITLE--}">---</span>';
        } elseif (isExtensionProductive($ext_name)) {
                // Productive code
-               $OUT = '<a title="{--ADMIN_REGISTER_EXTENSION_TITLE--}" href="{%url=modules.php?module=admin&amp;what=extensions&amp;reg_ext=' . $ext_name . '%}">{--ADMIN_REGISTER_EXTENSION--}</a>';
+               $OUT = '<a title="{--ADMIN_REGISTER_EXTENSION_TITLE--}" href="{%url=modules.php?module=admin&amp;what=extensions&amp;register_ext=' . $ext_name . '%}">{--ADMIN_REGISTER_EXTENSION--}</a>';
        }
 
        // Return code