1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge pull request #3471 from Nicofuma/ticket/13132

[ticket/13132] Twig: Add the loops content to the root context
This commit is contained in:
Marc Alexander
2015-03-06 21:34:19 +01:00
19 changed files with 352 additions and 3 deletions

View File

@@ -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;
}