[BUGFIX] BE: DatabaseTreeDataProvider maxLevels incorrect 96/37196/7
authorAndreas Allacher <andreas.allacher@gmx.at>
Wed, 25 Feb 2015 07:45:45 +0000 (08:45 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 20 May 2015 12:47:29 +0000 (14:47 +0200)
commit0c6e695ed9475ad2d9cf0e46777c1801496d18dc
treee8be0b4e380c96eab733026498117b0f2f0d0450
parent0c4d7e20cb2a36a5ec39e796b4a1254b93a44019
[BUGFIX] BE: DatabaseTreeDataProvider maxLevels incorrect

The current behaviour for maxLevels with treeConfig is incorrect.
Currently if one uses maxLevels 0, instead of only seeing the root category,
one actually is presented of nodes up to level 2
(if one would specify the levels in nonSelectableLevels).
With maxLevels 1 it is already up to level 3.
Of course, maxLevels 0 should only display the root level, maxLevels 1 only the first child nodes.
Also increased default levelMaximum to 4, in order to ensure old non configured
trees are still behaving as intended.

Change-Id: Ic1565e39abad01599dd67bbb05b0ce9fa7161af4
Resolves: #65304
Releases: master
Reviewed-on: http://review.typo3.org/37196
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Tree/TableConfiguration/AbstractTableConfigurationTreeDataProvider.php
typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php
typo3/sysext/core/Tests/Unit/Tree/TableConfiguration/DatabaseTreeDataProviderTest.php [new file with mode: 0644]