]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Many rewrites to get rid of dublicate modreg inserts while ext-cache is registered
[mailer.git] / inc / functions.php
index 342ab2e3fcf36b64cbc907c6fd2cb2dd189f5def..eedc0215f907ba0cd906e99aadef557541a458f1 100644 (file)
@@ -347,8 +347,11 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) {
                        $ret = $tmpl_file;
                }
 
-               // Add surrounding HTML comments to help finding bugs faster
-               $ret = "<!-- Template " . $template . " - Start -->\n" . $ret . "<!-- Template " . $template . " - End -->\n";
+               // Normal HTML output?
+               if ($GLOBALS['output_mode'] == 0) {
+                       // Add surrounding HTML comments to help finding bugs faster
+                       $ret = "<!-- Template " . $template . " - Start -->\n" . $ret . "<!-- Template " . $template . " - End -->\n";
+               } // END - if
        } elseif ((IS_ADMIN()) || ((isInstalling()) && (!isInstalled()))) {
                // Only admins shall see this warning or when installation mode is active
                $ret = "<br /><span class=\"guest_failed\">{--TEMPLATE_404--}</span><br />
@@ -2482,9 +2485,12 @@ function getActualVersion ($type = 'Revision') {
                } // END - if
 
                // Is the cache file outdated/invalid?
-               if ($new === true){
+               if ($new === true) {
+                       // Reload the cache file
+                       $GLOBALS['cache_instance']->loadCacheFile('revision');
+
                        // Destroy cache file
-                       $GLOBALS['cache_instance']->destroyCacheFile();
+                       $GLOBALS['cache_instance']->destroyCacheFile(false, true);
 
                        // @TODO shouldn't do the unset and the reloading $GLOBALS['cache_instance']->destroyCacheFile() Or a new methode like forceCacheReload('revision')?
                        unset($GLOBALS['cache_array']['revision']);