[BUGFIX] Remove only 'CType' keys from wizard 18/36418/4
authorGöran Bodenschatz <coding@46halbe.de>
Fri, 30 Jan 2015 13:00:58 +0000 (14:00 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 30 Jan 2015 13:16:29 +0000 (14:16 +0100)
Check for key name of 'CType' before removing the content
element from new content wizard.

This is a regression from #23864 where a hardcoded
CType column check was removed that is actually required
in this case.

Resolves: #61114
Related: #23864
Releases: master
Change-Id: Ib65410dee4f7328a3b8bbceaa21c8367843905f3
Reviewed-on: http://review.typo3.org/36418
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Zbigniew Jacko <z.jacko@macopedia.pl>
Tested-by: Zbigniew Jacko <z.jacko@macopedia.pl>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php

index 2b7a5c0..d60ffee 100644 (file)
@@ -472,7 +472,7 @@ class NewContentElementController {
                                                        $keepItems[$fN] = GeneralUtility::trimExplode(',', $TCEFORM_TSconfig[$fN]['keepItems'], TRUE);
                                                }
                                                $isNotInKeepItems = count($keepItems[$fN]) && !in_array($fV, $keepItems[$fN]);
-                                               if ($authModeDeny || in_array($fV, $removeItems[$fN]) || $isNotInKeepItems) {
+                                               if ($authModeDeny || $fN === 'CType' && in_array($fV, $removeItems[$fN]) || $isNotInKeepItems) {
                                                        // Remove element all together:
                                                        unset($wizardItems[$key]);
                                                        break;