From f15aa129cd77acecab30791cbd8c99fb038fe6c3 Mon Sep 17 00:00:00 2001 From: Sebastian Teumert Date: Tue, 10 Mar 2015 11:30:38 +0100 Subject: [PATCH] Fix error in temlate engine This patch fixes an error in the TemplateScriptingCompiler. Instead of using `WCF::getTPL()` now the engine which is passed during initialization is used. This allows one to compile e.g. frontend templates in the ACP and generally removes an unecessary coupling from the engine. --- .../lib/system/template/TemplateScriptingCompiler.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index 8a431d5558..7a4dfa3390 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -798,8 +798,8 @@ class TemplateScriptingCompiler { } if (!empty($phpCode)) $phpCode = ""; - $sourceFilename = WCF::getTPL()->getSourceFilename($templateName, $application); - $metaDataFilename = WCF::getTPL()->getMetaDataFilename($templateName); + $sourceFilename = $this->template->getSourceFilename($templateName, $application); + $metaDataFilename = $this->template->getMetaDataFilename($templateName); $data = $this->compileString($templateName, file_get_contents($sourceFilename), array( 'application' => $application, -- 2.20.1