aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/template/twig/node/event.php2
-rw-r--r--phpBB/includes/template/twig/twig.php7
2 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/includes/template/twig/node/event.php b/phpBB/includes/template/twig/node/event.php
index cedfa870fa..12e6ef1329 100644
--- a/phpBB/includes/template/twig/node/event.php
+++ b/phpBB/includes/template/twig/node/event.php
@@ -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)
diff --git a/phpBB/includes/template/twig/twig.php b/phpBB/includes/template/twig/twig.php
index 92eeb6d913..15e49df200 100644
--- a/phpBB/includes/template/twig/twig.php
+++ b/phpBB/includes/template/twig/twig.php
@@ -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']['.']);