From 839c74c5882de11b95046f6bca0ea0e02ea139c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 28 Dec 2012 22:35:28 +0000 Subject: [PATCH] Remove array element in cached mode --- inc/template-functions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/template-functions.php b/inc/template-functions.php index dc13d3e1b9..c05eb5d062 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -304,6 +304,9 @@ function loadTemplate ($template, $return = FALSE, $content = array(), $compileC if ((!isDebugTemplateCacheEnabled()) && (isTemplateCached('html', $template))) { // Evaluate the cache $templateContent = readTemplateCache('html', $template, $content); + + // Better remove array element which is only needed in uncached mode + unset($GLOBALS['template_eval']['html'][$template]); } elseif (!isset($GLOBALS['template_eval']['html'][$template])) { // Make all template names lowercase $template = strtolower($template); @@ -491,6 +494,9 @@ function loadEmailTemplate ($template, $content = array(), $userid = NULL, $load if ((!isDebugTemplateCacheEnabled()) && (isTemplateCached('email', $template))) { // Evaluate the cache $templateContent = readTemplateCache('email', $template, $content); + + // Better remove array element which is need only in uncached mode + unset($GLOBALS['template_eval']['email'][$template]); } elseif (!isset($GLOBALS['template_eval']['email'][$template])) { // Base directory $basePath = sprintf("%stemplates/%s/emails/", getPath(), getLanguage()); -- 2.39.5