1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 19:24:01 +02:00

[ticket/14944] Add possibility to search for template loop indexes by key

Adds a new function to the template interface, and implements it in the
context class.  The function returns the ordinal index for a specified key,
with the same structure that the key for alter_block_array.
Reuses same code. Remove unneeded references, do nothing for int keys.
Check out of bounds or wrong blockname errors.  Added tests.
Remove default parameter value.

PHPBB3-14944
This commit is contained in:
javiexin
2017-01-28 21:34:08 +01:00
parent 20c03cccdd
commit 849fd9df7d
4 changed files with 5 additions and 5 deletions

View File

@@ -135,7 +135,7 @@ abstract class base implements template
/**
* {@inheritdoc}
*/
public function find_key_index($blockname, $key = false)
public function find_key_index($blockname, $key)
{
return $this->context->find_key_index($blockname, $key);
}