From 48af062fe2436b60a8e71ab0c208dc2dd81c3230 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 13 Sep 2011 14:46:14 +0200 Subject: [PATCH] Fixed template compilation Template owner's package id was previously used, but conflicts with application groups. Furthermore template listeners were not included due to lack of cache loading. --- .../files/lib/system/template/TemplateEngine.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php index 219ef32c8a..f203d51818 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateEngine.class.php @@ -297,7 +297,7 @@ class TemplateEngine extends SingletonFactory { } $tplPackageID = $this->getPackageID($templateName, $packageID); - $compiledFilename = $this->getCompiledFilename($templateName, $tplPackageID); + $compiledFilename = $this->getCompiledFilename($templateName, $packageID); $sourceFilename = $this->getSourceFilename($templateName, $tplPackageID); // check if compilation is necessary @@ -752,6 +752,8 @@ class TemplateEngine extends SingletonFactory { * @return string */ public function getTemplateListenerCode($templateName, $eventName) { + $this->loadTemplateListenerCode($templateName); + if (isset($this->templateListeners[$templateName][$eventName])) { return implode("\n", $this->templateListeners[$templateName][$eventName]); } -- 2.20.1