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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user