[BUGFIX] Two wrong conditions in FormEngine expansion 99/51999/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 10 Mar 2017 21:12:00 +0000 (22:12 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sun, 12 Mar 2017 10:00:25 +0000 (11:00 +0100)
Two minor condition checks in FormEngine element expansion
classes.

Change-Id: I087b744ee826d9b7174261bc084c4c188920e6c8
Resolves: #80232
Releases: master
Reviewed-on: https://review.typo3.org/51999
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Thomas Hohn <thomas@hohn.dk>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/FieldControl/AddRecord.php
typo3/sysext/backend/Classes/Form/FieldWizard/OtherLanguageContent.php

index 876ddd4..0f197ef 100644 (file)
@@ -68,7 +68,10 @@ class AddRecord extends AbstractNode
         if (isset($options['pid'])) {
             // pid configured in options - use it
             $pid = $options['pid'];
         if (isset($options['pid'])) {
             // pid configured in options - use it
             $pid = $options['pid'];
-        } elseif (isset($GLOBALS['TCA'][$table]['ctrl']['rootLevel']) && (int)$GLOBALS['TCA'][$table]['ctrl'] === 1) {
+        } elseif (
+            isset($GLOBALS['TCA'][$table]['ctrl']['rootLevel'])
+            && (int)$GLOBALS['TCA'][$table]['ctrl']['rootLevel'] === 1
+        ) {
             // Target table can only exist on root level - set 0 as pid
             $pid = 0;
         }
             // Target table can only exist on root level - set 0 as pid
             $pid = 0;
         }
index df68803..d86b0ba 100644 (file)
@@ -47,7 +47,7 @@ class OtherLanguageContent extends AbstractNode
             || $fieldConfig['config']['type'] === 'inline'
             || $fieldConfig['config']['type'] === 'flex'
             || ($fieldConfig['config']['type'] === 'group' && isset($fieldConfig['config']['MM']))
             || $fieldConfig['config']['type'] === 'inline'
             || $fieldConfig['config']['type'] === 'flex'
             || ($fieldConfig['config']['type'] === 'group' && isset($fieldConfig['config']['MM']))
-            || ($fieldConfig['config']['type'] === 'selecet' && isset($fieldConfig['config']['MM']))
+            || ($fieldConfig['config']['type'] === 'select' && isset($fieldConfig['config']['MM']))
         ) {
             // Early return if there is no default language row or the display is disabled
             return $result;
         ) {
             // Early return if there is no default language row or the display is disabled
             return $result;