mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-13 20:32:11 +02:00
[ticket/14994] Refactor template->assign_block_var
Refactor assign_block_var to use the same block selection mechanism as is used in alter_block_array. This allows creating new blocks at any position in the template structure, not only on the last block. Allows selecting a block as outer[2].middle. Added tests. Added PHP 7.2 compatibility. PHPBB3-14994
This commit is contained in:
parent
c2043e47da
commit
a30693a594
@ -209,7 +209,7 @@ class context
|
||||
$name = $blocks[$i];
|
||||
|
||||
// Assign S_ROW_COUNT and S_ROW_NUM
|
||||
$s_row_count = isset($block[$name]) ? sizeof($block[$name]) : 0;
|
||||
$s_row_count = isset($block[$name]) ? count($block[$name]) : 0;
|
||||
$vararray['S_ROW_COUNT'] = $vararray['S_ROW_NUM'] = $s_row_count;
|
||||
|
||||
// Assign S_FIRST_ROW
|
||||
|
Loading…
x
Reference in New Issue
Block a user