[BUGFIX] Unified maxitems default value for group fields 78/27378/4
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Tue, 25 Mar 2014 16:18:22 +0000 (17:18 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 5 Jun 2014 21:07:08 +0000 (23:07 +0200)
The maxitems value for a group field defaults to 1 instead of 100000 so
that it is consistent with the TCA reference and the validation in the
DataHandler.

Resolves: #55731
Releases: 6.2
Change-Id: I517e45a9227ab9d971a9e7bc4410498319192517
Reviewed-on: https://review.typo3.org/27378
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Classes/Form/FormEngine.php

index 062ddef..65878be 100644 (file)
@@ -2415,10 +2415,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                $internal_type = $config['internal_type'];
                $show_thumbs = $config['show_thumbs'];
                $size = isset($config['size']) ? (int)$config['size'] : 5;
-               $maxitems = MathUtility::forceIntegerInRange($config['maxitems'], 0);
-               if (!$maxitems) {
-                       $maxitems = 100000;
-               }
+               $maxitems = MathUtility::forceIntegerInRange($config['maxitems'], 1);
                $minitems = MathUtility::forceIntegerInRange($config['minitems'], 0);
                $allowed = trim($config['allowed']);
                $disallowed = trim($config['disallowed']);