diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-10-07 20:51:08 +0200 |
---|---|---|
committer | Nicofuma <github@nicofuma.fr> | 2015-03-05 21:38:59 +0100 |
commit | cf39cfc5939f9407082f8f5c1f876ea0ee607a45 (patch) | |
tree | 06e9c0406bded428501015eb10b43718f0d0db1a /phpBB/phpbb/template | |
parent | 70990bc86ff66238ae2e9ccbc03bcf1afd49da07 (diff) | |
download | forums-cf39cfc5939f9407082f8f5c1f876ea0ee607a45.tar forums-cf39cfc5939f9407082f8f5c1f876ea0ee607a45.tar.gz forums-cf39cfc5939f9407082f8f5c1f876ea0ee607a45.tar.bz2 forums-cf39cfc5939f9407082f8f5c1f876ea0ee607a45.tar.xz forums-cf39cfc5939f9407082f8f5c1f876ea0ee607a45.zip |
[ticket/13132] Twig: Add loops content to the root context
PHPBB3-13132
Diffstat (limited to 'phpBB/phpbb/template')
-rw-r--r-- | phpBB/phpbb/template/twig/twig.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php index 605d37e954..0e4c619029 100644 --- a/phpBB/phpbb/template/twig/twig.php +++ b/phpBB/phpbb/template/twig/twig.php @@ -352,6 +352,12 @@ class twig extends \phpbb\template\base // cleanup unset($vars['loops']['.']); + // Inject in the main context the value added by assign_block_vars() to be able to use directly the Twig loops. + foreach ($vars['loops'] as $key => &$value) + { + $vars[$key] = $value; + } + return $vars; } |