From: Sebastian Teumert Date: Tue, 10 Mar 2015 10:30:38 +0000 (+0100) Subject: Fix error in temlate engine X-Git-Tag: 2.1.3~3^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f15aa129cd77acecab30791cbd8c99fb038fe6c3;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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,