View Issue Details

IDProjectCategoryView StatusLast Update
0020787mantisbtadministrationpublic2016-06-16 04:44
ReportervboctorAssigned Todregad 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0-rc.1 
Target Version1.3.0-rc.2Fixed in Version1.3.0-rc.2 
Summary0020787: Setting of arrays (complex type) in Configuration Page doesn't work
Description

Name: bug_print_page_fields
Type: complex
Value:
$g_bug_print_page_fields = array (
'additional_info',
'attachments',
'category_id',
'date_submitted',
'description',
'due_date',
'eta',
'fixed_in_version',
'handler',
'id',
'last_updated',
'os',
'os_version',
'platform',
'priority',
'product_build',
'product_version',
'project',
'projection',
'reporter',
'reproducibility',
'resolution',
'severity',
'status',
'steps_to_reproduce',
'summary',
'tags',
'target_version',
'view_state',
);

This gets added as:
array (
0 => '\'additional_info\'',
1 => '\'attachments\'',
2 => '\'category_id\'',
3 => '\'date_submitted\'',
4 => '\'description\'',
5 => '\'due_date\'',
6 => '\'eta\'',
7 => '\'fixed_in_version\'',
8 => '\'handler\'',
9 => '\'id\'',
10 => '\'last_updated\'',
11 => '\'os\'',
12 => '\'os_version\'',
13 => '\'platform\'',
14 => '\'priority\'',
15 => '\'product_build\'',
16 => '\'product_version\'',
17 => '\'project\'',
18 => '\'projection\'',
19 => '\'reporter\'',
20 => '\'reproducibility\'',
21 => '\'resolution\'',
22 => '\'severity\'',
23 => '\'status\'',
24 => '\'steps_to_reproduce\'',
25 => '\'summary\'',
26 => '\'tags\'',
27 => '\'target_version\'',
28 => '\'view_state\'',
)

Tagsmantishub

Relationships

related to 0016931 closeddregad PHPUnit tests for admin config functions 
related to 0016932 closeddregad Move functions defined in adm_config_set.php to a core API 
related to 0016917 closedvboctor Manage Configuration Complex Type fails when array is terminated with a semi-color 
related to 0021124 closeddregad Creating/setting config options using adm_config_report.php is partially broken 
parent of 0020812 closeddregad Setting of nested arrays in Configuration Page doesn't work 
parent of 0020813 closeddregad Setting Configuration Page of arrays with strings containing escaped quotes does not work 
parent of 0020850 closeddregad Configuration page parsing complex trims quotes incorrectly 
parent of 0020851 closeddregad Configuration page parsing associative keys incorrectly 

Activities

Related Changesets

MantisBT: master 8107ea50

2016-04-22 07:04:58

dregad

Details Diff
Parse complex configs using PHP tokenizer

Implements 2 classes to parse 'complex' config options in admin
Configuration Report page using PHP tokenizer instead of relying on
regular expressions.

- Tokenizer calls token_get_all() to build a list of tokens from the
given code
- Parser uses a Tokenizer object to convert the code (string) to an
actual PHP array variable

TODO: Move classes to an API and write automated tests

Fixes 0020787, 0020812, 0020813, 0020850, 0020851
mod - adm_config_set.php Diff File
mod - core/constant_inc.php Diff File
mod - lang/strings_english.txt Diff File

MantisBT: master 3ed60df1

2016-04-30 07:53:25

dregad

Details Diff
Parse complex configs using PHP tokenizer

Implements 2 classes to parse 'complex' config options in admin
Configuration Report page using PHP tokenizer instead of relying on
regular expressions.

- Tokenizer calls token_get_all() to build a list of tokens from the
given code
- Parser uses a Tokenizer object to convert the code (string) to an
actual PHP array variable

Includes PHPUnit test cases for the new parser code.

Fixes 0020787, 0020812, 0020813, 0020850, 0020851, 0016931, 0016932
PR https://github.com/mantisbt/mantisbt/pull/761
mod - adm_config_set.php Diff File
add - core/classes/ConfigParser.class.php Diff File
add - core/classes/Tokenizer.class.php Diff File
mod - core/constant_inc.php Diff File
mod - lang/strings_english.txt Diff File
mod - tests/Mantis/AllTests.php Diff File
add - tests/Mantis/ConfigParserTest.php Diff File

Issue History

Date Modified Username Field Change
2016-04-07 23:33 vboctor New Issue
2016-04-07 23:33 vboctor Tag Attached: mantishub
2016-04-14 19:58 cproensa Note Added: 0052952
2016-04-15 06:37 cproensa Relationship added related to 0020812
2016-04-15 06:44 cproensa Relationship added related to 0020813
2016-04-21 15:21 cproensa Relationship added related to 0020850
2016-04-21 19:15 cproensa Relationship added related to 0020851
2016-04-21 19:29 cproensa Assigned To => cproensa
2016-04-21 19:29 cproensa Status new => assigned
2016-04-22 11:21 dregad Relationship replaced parent of 0020812
2016-04-22 11:21 dregad Relationship replaced parent of 0020813
2016-04-22 11:21 dregad Relationship replaced parent of 0020850
2016-04-22 11:21 dregad Relationship replaced parent of 0020851
2016-04-22 11:23 dregad Category customization => administration
2016-04-24 05:43 cproensa Assigned To cproensa => dregad
2016-04-28 18:04 dregad Relationship added related to 0016931
2016-04-28 18:04 dregad Relationship added related to 0016932
2016-04-28 18:05 dregad Relationship added related to 0016917
2016-04-30 08:39 dregad Changeset attached => MantisBT master 3ed60df1
2016-04-30 08:42 dregad Status assigned => resolved
2016-04-30 08:42 dregad Fixed in Version => 1.3.0-rc.2
2016-04-30 08:42 dregad Resolution open => fixed
2016-04-30 09:01 dregad Changeset attached => MantisBT master 8107ea50
2016-06-12 00:42 vboctor Status resolved => closed
2016-06-16 04:44 atrol Relationship added related to 0021124