From c477f865fbab2ecc1cd13302f44d62b36af14c73 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Sat, 29 Jun 2013 19:22:58 -0500 Subject: [PATCH] [feature/twig] Add S_NUM_ROWS to loops in context PHPBB3-11598 --- phpBB/includes/template/context.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/includes/template/context.php b/phpBB/includes/template/context.php index 9826f5e5f5..4689cf2d77 100644 --- a/phpBB/includes/template/context.php +++ b/phpBB/includes/template/context.php @@ -178,6 +178,11 @@ class phpbb_template_context // We're adding a new iteration to this block with the given // variable assignments. $str[$blocks[$blockcount]][] = $vararray; + + foreach ($str[$blocks[$blockcount]] as &$mod_block) + { + $mod_block['S_NUM_ROWS'] = $blockcount; + } } else {