aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template/context.php
Commit message (Collapse)AuthorAgeFilesLines
* [ticket/15424] Multiple typo fixes in docs & commentsluzpaz2019-05-081-2/+2
| | | | | | Fixed typos in some docs, guidelines, some non-user-facing files. PHPBB3-15424
* [ticket/15904] Fix counting empty template blockskasimi2018-12-081-1/+2
| | | | PHPBB3-15904
* [ticket/15659] Fix retrieve_block_vars()Jakub Senko2018-07-071-0/+10
| | | | PHPBB3-15659
* [ticket/14972] Fix template context use of sizeof()Marc Alexander2018-01-011-46/+33
| | | | PHPBB3-14972
* [ticket/14994] Refactor template->assign_block_varjaviexin2017-11-011-1/+1
| | | | | | | | | | 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
* [ticket/14994] Refactor template->assign_block_varjaviexin2017-11-011-19/+4
| | | | | | | | | | 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
* [ticket/14994] Refactor template->assign_block_varjaviexin2017-10-291-51/+46
| | | | | | | | | 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. PHPBB3-14994
* Merge remote-tracking branch 'javiexin/ticket/15068' into 3.2.xMarc Alexander2017-05-291-0/+73
|\
| * Merge branch '3.2.x' into ticket/15068javiexin2017-03-091-33/+127
| |\
| * | [ticket/15068] Add template vars retrieval from the template objectjaviexin2017-03-091-3/+19
| | | | | | | | | | | | | | | | | | Add possibility to retrieve full block of vars PHPBB3-15068
| * | [ticket/15068] Add template vars retrieval from the template objectjaviexin2017-02-051-0/+57
| | | | | | | | | | | | PHPBB3-15068
* | | Merge pull request #4612 from javiexin/ticket/14950Marc Alexander2017-04-151-1/+41
|\ \ \ | |_|/ |/| | | | | [ticket/14950] Add possibility to delete a template block
| * | [ticket/14950] Add possibility to delete a template blockjaviexin2017-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | [ticket/14950] Add possibility to delete a template blockjaviexin2017-01-041-1/+41
| |/ | | | | | | | | | | | | | | | | 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. PHPBB3-14944
* | Merge pull request #4605 from javiexin/ticket/14943Marc Alexander2017-02-231-29/+40
|\ \ | | | | | | | | | [ticket/14943] Fix template loop access by index
| * | [ticket/14943] Fix template loop access by indexjaviexin2017-01-121-30/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allows inserting elements in a loop specified as 'outer[3].inner'. This was coded, but malfunctioning. Name incorrectly set on insert. If block was empty, the insertion process should create it. Checking for out of bounds indexes. PHPBB3-14943
| * | [ticket/14943] Fix template loop access by indexjaviexin2017-01-011-1/+3
| | | | | | | | | | | | | | | | | | | | | Allows inserting elements in a loop specified as 'outer[3].inner'. This was coded, but malfunctioning. Name incorrectly set on insert. PHPBB3-14943
* | | Merge pull request #4598 from javiexin/ticket/14944Marc Alexander2017-02-191-0/+83
|\ \ \ | |/ / |/| | | | | [ticket/14944] Add search for template loop indexes by key
| * | [ticket/14944] Add possibility to search for template loop indexes by keyjaviexin2017-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | [ticket/14944] Add possibility to search for template loop indexes by keyjaviexin2017-01-081-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. PHPBB3-14944
| * | [ticket/14944] Add possibility to search for template loop indexes by keyjaviexin2016-12-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. PHPBB3-14944
| * | [ticket/14944] Add possibility to search for template loop indexes by keyjaviexin2016-12-281-0/+71
| |/ | | | | | | | | | | | | | | | | 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. PHPBB3-14944
* | [ticket/14943] Fix template loop access by indexjaviexin2016-12-281-4/+4
|/ | | | | | | Allows inserting elements in a loop specified as 'outer[3].inner'. This was coded, but malfunctioning. PHPBB3-14943
* [ticket/12892] Do not set S_NUM_ROWS when adding a row to a template loopJoas Schilling2014-07-251-20/+58
| | | | | | | | We do not set S_NUM_ROWS while adding a row, to reduce the complexity If we would set it on adding, each subsequent adding would cause n modifications, resulting in a O(n!) complexity, rather then O(n) PHPBB3-12892
* [ticket/12715] Cleanup comments in \phpbb\template\*Tristan Darricau2014-06-151-0/+5
| | | | PHPBB3-12715
* [ticket/12594] Remove @package tags and update file headersYuriy Rusko2014-05-271-5/+7
| | | | PHPBB3-12594
* Merge remote-tracking branch 'rxu3/ticket/12224' into developJoas Schilling2014-03-101-0/+16
|\ | | | | | | | | | | * rxu3/ticket/12224: [ticket/12224] Add assign_block_vars_array() test. [ticket/12224] Add template wrapper method to assign block arrays
| * [ticket/12224] Add template wrapper method to assign block arraysrxu2014-02-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | Add one more wrapper template method for the function assign_block_vars() which takes a 2-dimensional array as a parameter and calls assign_block_vars() in a loop to assign the whole block loop at once. This can make the core a little bit more expendable from the point of developing extensions as it allows to pass the data to events before it's being assigned to template. PHPBB3-12224
* | [ticket/12232] Fix a similar excessive pattern in the method.Cesar G2014-02-271-1/+2
| | | | | | | | PHPBB3-12232
* | [ticket/12232] Remove excessive calls to sizeof() in assign_block_vars() methodCesar G2014-02-271-1/+2
|/ | | | | | | | | | The size of the template block array is calculated within a foreach loop iterating through the array, which is unnecessary. It only needs to be done once. In a block of 1000 rows, this results in 500,500 calls to sizeof() in this location. With this change, that's reduced to 1000. PHPBB3-12232
* [task/code-sniffer] Remove the IN_PHPBB check side-effect from class files.Andreas Fischer2013-10-301-8/+0
| | | | PHPBB3-11980
* [ticket/11981] Fix code sniffer complaintsMarc Alexander2013-10-281-2/+2
| | | | PHPBB3-11981
* [ticket/11700] Fix some more incorrectly changed commentsNils Adermann2013-09-191-1/+1
| | | | PHPBB3-11700
* [ticket/11700] And some last comments with backslashesNils Adermann2013-09-161-2/+2
| | | | PHPBB3-11700
* [ticket/11700] Move all recent code to namespacesNils Adermann2013-09-161-5/+7
| | | | PHPBB3-11700
* [ticket/11698] Moving all autoloadable files to phpbb/Nils Adermann2013-07-141-0/+389
PHPBB3-11698