Fixed template compilation
authorAlexander Ebert <ebert@woltlab.com>
Tue, 13 Sep 2011 12:46:14 +0000 (14:46 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 13 Sep 2011 12:46:14 +0000 (14:46 +0200)
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.

wcfsetup/install/files/lib/system/template/TemplateEngine.class.php

index 219ef32c8a4cb5a68fb07f5e7575f1134bbdc6c3..f203d51818590f28d5875c132d7b764386592e28 100644 (file)
@@ -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]);
                }