1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[feature/twig] INCLUDEJS now uses the definition class

This had to be done because, like DEFINE, setting variables to $context
only affected the local file and any children, not parent templates.

PHPBB3-11598
This commit is contained in:
Nathaniel Guse
2013-07-02 10:13:16 -05:00
parent 883b0a9f8c
commit 156d5c671f
4 changed files with 23 additions and 4 deletions

View File

@@ -31,9 +31,9 @@ class phpbb_template_twig_node_includejs extends Twig_Node
$config = $this->environment->get_phpbb_config();
$compiler
->write("\$context['SCRIPTS'] .= '<script type=\"text/javascript\" src=\"' . ")
->write("\$context['definition']->append('SCRIPTS', '<script type=\"text/javascript\" src=\"' . ")
->subcompile($this->getNode('expr'))
->raw(" . '?assets_version=" . $config['assets_version'] . "\"></script>';\n\n")
->raw(" . '?assets_version=" . $config['assets_version'] . "\"></script>');\n")
;
}
}