[feature/twig] Fix <!-- .blah since the being node was changed

PHPBB3-11598
This commit is contained in:
Nathan Guse 2013-06-24 12:52:55 -05:00
parent c958155fb6
commit 63143a1a57
2 changed files with 7 additions and 2 deletions

View file

@ -27,8 +27,6 @@ class phpbb_template_twig_node_event extends Twig_Node
{
$compiler->addDebugInfo($this);
$compiler->indent();
$location = $this->getNode('expr')->getAttribute('name');
foreach ($this->environment->get_phpbb_extensions() as $ext_namespace => $ext_path)

View file

@ -431,6 +431,13 @@ class phpbb_template_twig implements phpbb_template
)
);
// Must do this so that <!-- IF .blah --> works correctly
// (only for the base loops, the rest are properly handled by the begin node)
foreach ($this->context->get_tpldata() as $block_name => $block_values)
{
$vars[$block_name] = !empty($block_values);
}
// cleanup
unset($vars['_phpbb_blocks']['.']);