diff options
Diffstat (limited to 'phpBB/includes/template/twig/node')
| -rw-r--r-- | phpBB/includes/template/twig/node/event.php | 1 | ||||
| -rw-r--r-- | phpBB/includes/template/twig/node/includejs.php | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/includes/template/twig/node/event.php b/phpBB/includes/template/twig/node/event.php index 12e6ef1329..358c68dae5 100644 --- a/phpBB/includes/template/twig/node/event.php +++ b/phpBB/includes/template/twig/node/event.php @@ -9,6 +9,7 @@ class phpbb_template_twig_node_event extends Twig_Node { + /** @var Twig_Environment */ protected $environment; public function __construct(Twig_Node_Expression $expr, phpbb_template_twig_environment $environment, $lineno, $tag = null) diff --git a/phpBB/includes/template/twig/node/includejs.php b/phpBB/includes/template/twig/node/includejs.php index 881636a326..f4c26affa4 100644 --- a/phpBB/includes/template/twig/node/includejs.php +++ b/phpBB/includes/template/twig/node/includejs.php @@ -9,8 +9,13 @@ class phpbb_template_twig_node_includejs extends Twig_Node { - public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null) + /** @var Twig_Environment */ + protected $environment; + + public function __construct(Twig_Node_Expression $expr, phpbb_template_twig_environment $environment, $lineno, $tag = null) { + $this->environment = $environment; + parent::__construct(array('expr' => $expr), array(), $lineno, $tag); } @@ -23,10 +28,12 @@ class phpbb_template_twig_node_includejs extends Twig_Node { $compiler->addDebugInfo($this); + $config = $this->environment->get_phpbb_config(); + $compiler ->write("\$context['SCRIPTS'] .= '<script type=\"text/javascript\" src=\"' . ") ->subcompile($this->getNode('expr')) - ->raw(" . '\">';\n\n") + ->raw(" . '?assets_version=" . $config['assets_version'] . "\"></script>';\n\n") ; } } |
