mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/14950] Add possibility to delete a template block
Adds a new mode to alter_block_array to allow for the deletion of a certain block of template variables. The selection method is the same as for the other modes for alter_block_array. The passed in vararray is ignored, and an out of bounds index is considered an error. Added tests for the new function, fixed. PHPBB3-14950
This commit is contained in:
parent
7f8dd6b007
commit
988865fd0a
1 changed files with 1 additions and 1 deletions
|
@ -636,7 +636,7 @@ EOT
|
|||
|
||||
$this->template->alter_block_array('outer', array(), 1, 'delete');
|
||||
|
||||
$expect = 'outer - 0 - one[outer|2]outer - 1 - three[outer|3]middle - 0 - 3A[middle|3]middle - 1 - 3B[middle|3]middle - 2 - 3C[middle|3]';
|
||||
$expect = 'outer - 0 - one[outer|2]outer - 1 - three[outer|2]middle - 0 - 3A[middle|3]middle - 1 - 3B[middle|3]middle - 2 - 3C[middle|3]';
|
||||
$this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Deleting by index at top level');
|
||||
|
||||
$this->template->alter_block_array('outer.middle', array(), 1, 'delete');
|
||||
|
|
Loading…
Add table
Reference in a new issue