From: Roland Häder Date: Fri, 28 Dec 2012 22:35:28 +0000 (+0000) Subject: Remove array element in cached mode X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=839c74c5882de11b95046f6bca0ea0e02ea139c8;p=mailer.git Remove array element in cached mode --- 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());