[FOLLOWUP][BUGFIX] Fix evaluation of rootLevel configuration in NewRecordController 02/50102/2
authorNicole Cordes <typo3@cordes.co>
Fri, 7 Oct 2016 07:43:48 +0000 (09:43 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 9 Oct 2016 23:20:30 +0000 (01:20 +0200)
commitc3c27ece33a1b37e887ef28776da6fb583e3ba38
tree265fe7803be6766f1587aa443425cb2c8b97cf4f
parente4c41dd9f573ab2f7c60d321ca9100a7c58f9f2e
[FOLLOWUP][BUGFIX] Fix evaluation of rootLevel configuration in NewRecordController

If there is no configuration for the rootLevel in a tables' TCA, the
NewRecordController silently assumes -1. This means a table can be
inserted on a page AND on root level. This behaviour is wrong because in
TCA documentation per default rootLevel is 0 which means, this table can
only be used on pages.
This patch sets the correct default value for rootLevel if not set.

Resolves: #78170
Releases: master, 7.6
Change-Id: I3a34eb5abbd95b7ee60b8b676c86abaacd0e2a18
Reviewed-on: https://review.typo3.org/50102
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/backend/Classes/Controller/NewRecordController.php