1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-10 19:56:52 +02:00
Commit Graph

116 Commits

Author SHA1 Message Date
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
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
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
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
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
rxu
49c19a267f [ticket/14958] Optimize Twig extension lang() function
PHPBB3-14958
2017-01-05 00:42:27 +07:00
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
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
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
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
ff8b5058e0 [ticket/14661] Fix a typo in twig.php
PHPBB3-14661
2016-06-05 13:40:40 +03:00
5f905f67ee [ticket/14099] Fix the assets
PHPBB3-14099
2015-08-18 21:03:03 +02:00
a83bcaa8ac [ticket/14099] Fix tests
PHPBB3-14099
2015-08-14 15:52:35 +02:00
498a516017 [ticket/13995] Remove deprecated projection media type
PHPBB3-13995
2015-07-07 20:09:01 -07:00
01073ffcbf Merge pull request #3560 from Nicofuma/ticket/13790
[ticket/13790] Update phpcs
2015-05-30 10:53:47 +02:00
a462f14aa3 [ticket/13790] Update phpcs
PHPBB3-13790
2015-05-19 22:19:18 +02:00
62e13e945c [ticket/13838] Fix coding style
PHPBB3-13838
2015-05-14 15:43:44 +02:00
41966c481f [ticket/13133] Fix variable name in set_custom_style()
PHPBB3-13133
2015-01-20 14:21:02 -08:00
5b1c9831c2 Merge pull request #3099 from Senky/ticket/13266
[ticket/13266] Enabling twig dump function if DEBUG is defined
2014-12-27 13:31:01 +01:00
9aa8f44489 [ticket/13133] Rename $ok variable
PHPBB3-13133
2014-11-07 15:57:31 +01:00
4522db7624 [ticket/13266] Enable twig dump function
PHPBB3-13266
2014-11-01 12:31:58 +01:00
911831a9c5 [ticket/13133] Allow @vendor_name for includecss
PHPBB3-13133
2014-10-08 18:25:36 +02:00
d03be5ea5f [ticket/13070] Use old 'template' class for template class hook
PHPBB3-13070
2014-09-22 20:03:55 +02:00
273fc5b5b6 [ticket/12661] Add template test
PHPBB3-12661
2014-08-24 10:16:39 +02:00
ae3b015f65 [ticket/12661] Load extensions templates from "all" folder by render()
PHPBB3-12661
2014-08-24 08:10:37 +02:00
dfcbace621 [ticket/12557] Template fixes
PHPBB3-12557
2014-08-03 07:12:34 +03:00
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
6d40b87661 [ticket/12781] Template regex for IF catch too many things
PHPBB3-12781
2014-06-27 16:04:56 +02:00
0d0113e6da [ticket/12715] Cleanup comments in \phpbb\template\*
PHPBB3-12715
2014-06-15 19:15:06 +02:00
2a42aee8ac Merge remote-tracking branch 'upstream/develop-ascraeus' into ticket/12594 2014-05-28 01:02:39 +02:00
a759704b39 [ticket/12594] Remove @package tags and update file headers
PHPBB3-12594
2014-05-27 20:51:13 +02:00
05cd25a88b [ticket/12509] Add example in doc block
PHPBB3-12509
2014-05-27 00:05:12 +02:00
9fc2063d86 [ticket/12509] Fix doc block
PHPBB3-12509
2014-05-13 23:49:21 +02:00
1e427fa031 [ticket/12509] Fix the call to set_custom_file in adm/index and messenger
PHPBB3-12509
2014-05-13 23:39:42 +02:00
300d5c32db [ticket/12509] Add an option to set the path of custom file for extensions
https://tracker.phpbb.com/browse/PHPBB3-12509

PHPBB3-12509
2014-05-13 23:22:54 +02:00
d18f19a3bb [ticket/12382] Allow nested loops in included files.
They have to reference the fully qualified loop name in BEGIN and END.

PHPBB3-12382
2014-05-03 00:13:06 +02:00
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
99db2d9199 [ticket/12232] Fix a similar excessive pattern in the method.
PHPBB3-12232
2014-02-27 22:28:43 -08:00
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
d3ce584dc7 [ticket/12100] Re-order arguments in template environment constructor
PHPBB3-12100
2014-01-27 20:38:15 -08:00
75c54f7f5e [ticket/12100] Ensure enabled extensions are fresh in Twig environment
PHPBB3-12100
2014-01-27 18:51:39 -08:00
2e5117a71e [ticket/11943] Throw an exception if DEFINE is setup improperly
PHPBB3-11943
2013-11-09 11:14:55 -06:00
6370970f13 [ticket/11943] Split fix_inline_variable_tokens into 3 steps
DEFINE shouldn't add/remove surrounding quotes, but must have the inline
variable tokens fixed

PHPBB3-11943
2013-11-08 22:30:58 -06:00
da332aa0a5 [ticket/11943] Require stricter DEFINE statements for templates
PHPBB3-11943
2013-11-08 19:55:16 -06:00
b49d3a1851 [ticket/11943] Do not quote the value when it is exactly true, false, or null
Quoting these can change the meaning of the value (e.g. 'false' == true)

PHPBB3-11943
2013-11-04 12:21:12 -06:00
ef1f991837 [task/code-sniffer] Replace spaces with tabs.
PHPBB3-11980
2013-10-30 13:37:29 +01:00
7aa8f6461f [task/code-sniffer] Remove the IN_PHPBB check side-effect from class files.
PHPBB3-11980
2013-10-30 13:05:28 +01:00
02e9f6e284 [task/code-sniffer] Fix argument list spacing.
PHPBB3-11980
2013-10-29 23:38:05 +01:00
7f58a4572e [ticket/11981] Fix code sniffer complaints
PHPBB3-11981
2013-10-28 23:05:46 +01:00