1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-21 14:59:46 +02:00

37 Commits

Author SHA1 Message Date
rxu
4ed854c818
[ticket/16288] PHP 8 compatibility
PHPBB3-16288
2020-01-03 02:21:37 +07:00
luzpaz
a9a28859d4
[ticket/15424] Multiple typo fixes in docs & comments
Fixed typos in some docs, guidelines, some non-user-facing files.

PHPBB3-15424
2019-05-08 22:20:56 +02:00
kasimi
3bce8bce10
[ticket/15904] Fix counting empty template blocks
PHPBB3-15904
2018-12-08 22:06:19 +01:00
Jakub Senko
b5daa91650
[ticket/15659] Fix retrieve_block_vars()
PHPBB3-15659
2018-07-07 15:46:24 +02:00
Marc Alexander
ff18802656
[ticket/14972] Fix template context use of sizeof()
PHPBB3-14972
2018-01-01 13:56:04 +01:00
javiexin
a30693a594
[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
2017-11-01 12:29:49 +01:00
javiexin
c2043e47da
[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
2017-11-01 12:29:49 +01:00
javiexin
e32324c72a
[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.

PHPBB3-14994
2017-10-29 11:06:18 +01:00
Marc Alexander
7dc288cb89 Merge remote-tracking branch 'javiexin/ticket/15068' into 3.2.x 2017-05-29 12:13:41 +02:00
Marc Alexander
269150ed40
Merge pull request #4612 from javiexin/ticket/14950
[ticket/14950] Add possibility to delete a template block
2017-04-15 18:18:32 +02:00
javiexin
bd12504f6c Merge branch '3.2.x' into ticket/15068 2017-03-09 16:12:25 +01:00
javiexin
96a90d3f81 [ticket/15068] Add template vars retrieval from the template object
Add possibility to retrieve full block of vars

PHPBB3-15068
2017-03-09 16:05:39 +01:00
Marc Alexander
9267235f30
Merge pull request #4605 from javiexin/ticket/14943
[ticket/14943] Fix template loop access by index
2017-02-23 22:21:16 +01:00
Marc Alexander
481a592b8d
Merge pull request #4598 from javiexin/ticket/14944
[ticket/14944] Add search for template loop indexes by key
2017-02-19 21:47:00 +01:00
javiexin
f23d9bf2e0 [ticket/15068] Add template vars retrieval from the template object
PHPBB3-15068
2017-02-05 21:47:31 +01:00
javiexin
849fd9df7d [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
2017-01-28 21:34:08 +01:00
javiexin
136c74bd1c [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
2017-01-12 21:28:58 +01:00
javiexin
d2ad751851 [ticket/14943] Fix template loop access by index
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
2017-01-12 21:25:39 +01:00
javiexin
20c03cccdd [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.

PHPBB3-14944
2017-01-08 00:00:47 +01:00
javiexin
92708b2905 [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.

PHPBB3-14944
2017-01-04 00:36:23 +01:00
javiexin
45ea013b11 [ticket/14943] Fix template loop access by index
Allows inserting elements in a loop specified as 'outer[3].inner'.
This was coded, but malfunctioning.  Name incorrectly set on insert.

PHPBB3-14943
2017-01-01 21:22:29 +01:00
javiexin
c656bd60ef [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.

PHPBB3-14944
2016-12-30 18:03:09 +01:00
javiexin
cff57f9076 [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.

PHPBB3-14944
2016-12-28 12:55:26 +01:00
javiexin
d9991bdaf1 [ticket/14943] Fix template loop access by index
Allows inserting elements in a loop specified as 'outer[3].inner'.
This was coded, but malfunctioning.

PHPBB3-14943
2016-12-28 12:37:53 +01:00
Joas Schilling
831e9116ab [ticket/12892] Do not set S_NUM_ROWS when adding a row to a template loop
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
2014-07-25 17:48:53 +02:00
Tristan Darricau
0d0113e6da [ticket/12715] Cleanup comments in \phpbb\template\*
PHPBB3-12715
2014-06-15 19:15:06 +02:00
Yuriy Rusko
a759704b39 [ticket/12594] Remove @package tags and update file headers
PHPBB3-12594
2014-05-27 20:51:13 +02:00
Joas Schilling
235f7c3721 Merge remote-tracking branch 'rxu3/ticket/12224' into develop
* rxu3/ticket/12224:
  [ticket/12224] Add assign_block_vars_array() test.
  [ticket/12224] Add template wrapper method to assign block arrays
2014-03-10 23:49:37 +01:00
Cesar G
99db2d9199 [ticket/12232] Fix a similar excessive pattern in the method.
PHPBB3-12232
2014-02-27 22:28:43 -08:00
Cesar G
5c3fc4840c [ticket/12232] Remove excessive calls to sizeof() in assign_block_vars() method
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
2014-02-27 19:29:02 -08:00
rxu
dda775c418 [ticket/12224] Add template wrapper method to assign block arrays
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
2014-02-23 22:04:35 +08:00
Andreas Fischer
7aa8f6461f [task/code-sniffer] Remove the IN_PHPBB check side-effect from class files.
PHPBB3-11980
2013-10-30 13:05:28 +01:00
Marc Alexander
7f58a4572e [ticket/11981] Fix code sniffer complaints
PHPBB3-11981
2013-10-28 23:05:46 +01:00
Nils Adermann
06e7c84235 [ticket/11700] Fix some more incorrectly changed comments
PHPBB3-11700
2013-09-19 15:27:03 +02:00
Nils Adermann
390dc86344 [ticket/11700] And some last comments with backslashes
PHPBB3-11700
2013-09-16 05:00:18 +02:00
Nils Adermann
b95fdacdd3 [ticket/11700] Move all recent code to namespaces
PHPBB3-11700
2013-09-16 00:25:27 +02:00
Nils Adermann
7030578bbe [ticket/11698] Moving all autoloadable files to phpbb/
PHPBB3-11698
2013-07-14 01:32:34 -04:00