]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Ticket resolved, code rewrites and caching:
[mailer.git] / inc / functions.php
index 2ee2e1e2648972fae280c075f2c5f2596276302e..74cef5493551f8a770cf405d2de2fa5cd914ec03 100644 (file)
@@ -145,7 +145,7 @@ function OUTPUT_HTML ($HTML, $newLine = true) {
                        // Was that eval okay?
                        if (empty($newContent)) {
                                // Something went wrong!
-                               die("Evaluation error:<pre>".htmlentities($eval)."</pre>");
+                               mxchange_die("Evaluation error:<pre>".htmlentities($eval)."</pre>");
                        } // END - if
                        $OUTPUT = $newContent;
                } // END - while
@@ -853,22 +853,22 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") {
                $tmpl_file = addslashes($tmpl_file);
 
                // Run code
-               $tmpl_file = "\$newContent=html_entity_decode(\"".COMPILE_CODE($tmpl_file)."\");";
+               $tmpl_file = "\$newContent = html_entity_decode(\"".COMPILE_CODE($tmpl_file)."\");";
                @eval($tmpl_file);
        } elseif (!empty($template)) {
                // Template file not found!
-               $newContent = TEMPLATE_404.": ".$template."<br />
-".TEMPLATE_CONTENT."
+               $newContent = "{!TEMPLATE_404!}: ".$template."<br />
+{!TEMPLATE_CONTENT!}
 <pre>".print_r($content, true)."</pre>
-".TEMPLATE_DATA."
+{!TEMPLATE_DATA!}
 <pre>".print_r($DATA, true)."</pre>
 <br /><br />";
 
                // Debug mode not active? Then remove the HTML tags
-               if (!DEBUG_MODE) $newContent = strip_tags($newContent);
+               if (!isBooleanConstantAndTrue('DEBUG_MODE')) $newContent = strip_tags($newContent);
        } else {
                // No template name supplied!
-               $newContent = NO_TEMPLATE_SUPPLIED;
+               $newContent = getMessage('NO_TEMPLATE_SUPPLIED');
        }
 
        // Is there some content?
@@ -2638,7 +2638,7 @@ function CACHE_PURGE_ADMIN_MENU ($id=0, $action="", $what="", $str="") {
                // No cache instance!
                DEBUG_LOG(__FUNCTION__, __LINE__, " No cache instance found.");
                return false;
-       } elseif ((!isConfigEntrySet('cache_admin_menu')) || (getConfig('cache_admin_menu') == "N")) {
+       } elseif ((!isConfigEntrySet('cache_admin_menu')) || (getConfig('cache_admin_menu') != "Y")) {
                // Caching disabled (currently experiemental!)
                return false;
        }