Pass variables from current scope in LangCompilerTemplatePlugin
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 29 Jul 2016 13:35:12 +0000 (15:35 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 29 Jul 2016 14:25:53 +0000 (16:25 +0200)
This is needed in case the Template is evaluated by the
EmailTemplateEngine, as dynamic language variables use the variables
of the regular TemplateEngine.

wcfsetup/install/files/lib/system/template/plugin/LangCompilerTemplatePlugin.class.php

index efb4b9e7f13682d53f37ad96eceaa1587c350a0c..ac744fd88cf89a48d9ff3301997f673a80b03151 100644 (file)
@@ -23,7 +23,7 @@ class LangCompilerTemplatePlugin implements ICompilerTemplatePlugin {
                
                $tagArgs = $compiler->makeArgString($tagArgs);
                return "<?php
-                       \$this->tagStack[] = array('lang', array($tagArgs));
+                       \$this->tagStack[] = array('lang', array_merge(\$this->v, array($tagArgs)));
                        ob_start();
                        ?>";
        }