From 22eab72de11b4a7dafa3ab9d5ab35e84cabfd934 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 6 Nov 2012 01:20:50 +0100 Subject: [PATCH] Added support for 'application' include-argument --- .../system/template/TemplateScriptingCompiler.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index 246dc4c9ce..2065f7acdf 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -753,6 +753,12 @@ class TemplateScriptingCompiler { unset($args['once']); } + $application = '$this->v[\'__APPLICATION\']'; + if (isset($args['application'])) { + $application = $args['application']; + unset($args['application']); + } + $templateName = substr($file, 1, -1); // check for static includes if ($sandbox === 'false' && $assignVar === false && $once === false) { @@ -809,7 +815,7 @@ class TemplateScriptingCompiler { $phpCode .= "ob_start();\n"; } - $phpCode .= '$this->includeTemplate('.$file.', $this->v[\'__APPLICATION\'], array('.$argString.'), ('.$sandbox.' ? 1 : 0));'."\n"; + $phpCode .= '$this->includeTemplate('.$file.', '.$application.', array('.$argString.'), ('.$sandbox.' ? 1 : 0));'."\n"; if ($assignVar !== false) { $phpCode .= '$this->'.($append ? 'append' : 'assign').'('.$assignVar.', ob_get_clean());'."\n"; -- 2.20.1