From: Alexander Ebert Date: Tue, 6 Nov 2012 00:20:50 +0000 (+0100) Subject: Added support for 'application' include-argument X-Git-Tag: 2.0.0_Beta_1~805 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=22eab72de11b4a7dafa3ab9d5ab35e84cabfd934;p=GitHub%2FWoltLab%2FWCF.git Added support for 'application' include-argument --- 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";