[CLEANUP] Remove unused GET parameter fieldConfig for wizards 13/44413/5
authorThomas Maroschik <tmaroschik@dfau.de>
Fri, 30 Oct 2015 15:12:40 +0000 (16:12 +0100)
committerAlexander Opitz <opitz.alexander@googlemail.com>
Wed, 4 Nov 2015 08:20:01 +0000 (09:20 +0100)
Many wizard links contain a lot of parameters for legacy reasons.
We can dramatically shorten those in many cases by removing
fieldConfig from them. After searching for fieldConfig throughout
the core it doesn't look like the parameter is used at all.

This patch removes the parameter from link generation.

Resolves: #34420
Releases: master
Change-Id: Ica7e5aff1d4834b95e550b7170b27550fad955f6
Reviewed-on: https://review.typo3.org/44413
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php

index 06854d5..c1a9be3 100644 (file)
@@ -135,7 +135,6 @@ abstract class AbstractFormElement extends AbstractNode
         $fieldChangeFunc = $PA['fieldChangeFunc'];
         $item = $itemKinds[0];
         $md5ID = 'ID' . GeneralUtility::shortmd5($itemName);
-        $fieldConfig = $PA['fieldConf']['config'];
         $prefixOfFormElName = 'data[' . $table . '][' . $row['uid'] . '][' . $field . ']';
         $flexFormPath = '';
         if (GeneralUtility::isFirstPartOfStr($PA['itemFormElName'], $prefixOfFormElName)) {
@@ -204,7 +203,6 @@ abstract class AbstractFormElement extends AbstractNode
             switch ($wizardConfiguration['type']) {
                 case 'userFunc':
                     $params = array();
-                    $params['fieldConfig'] = $fieldConfig;
                     $params['params'] = $wizardConfiguration['params'];
                     $params['exampleImg'] = $wizardConfiguration['exampleImg'];
                     $params['table'] = $table;
@@ -231,10 +229,6 @@ abstract class AbstractFormElement extends AbstractNode
 
                 case 'script':
                     $params = array();
-                    // Including the full fieldConfig from TCA may produce too long an URL
-                    if ($wizardIdentifier != 'RTE') {
-                        $params['fieldConfig'] = $fieldConfig;
-                    }
                     $params['params'] = $wizardConfiguration['params'];
                     $params['exampleImg'] = $wizardConfiguration['exampleImg'];
                     $params['table'] = $table;
@@ -260,7 +254,6 @@ abstract class AbstractFormElement extends AbstractNode
 
                 case 'popup':
                     $params = array();
-                    $params['fieldConfig'] = $fieldConfig;
                     $params['params'] = $wizardConfiguration['params'];
                     $params['exampleImg'] = $wizardConfiguration['exampleImg'];
                     $params['table'] = $table;
@@ -315,7 +308,6 @@ abstract class AbstractFormElement extends AbstractNode
 
                 case 'colorbox':
                     $params = array();
-                    $params['fieldConfig'] = $fieldConfig;
                     $params['params'] = $wizardConfiguration['params'];
                     $params['exampleImg'] = $wizardConfiguration['exampleImg'];
                     $params['table'] = $table;
@@ -356,7 +348,7 @@ abstract class AbstractFormElement extends AbstractNode
                     break;
                 case 'slider':
                     $params = array();
-                    $params['fieldConfig'] = $fieldConfig;
+                    $params['fieldConfig'] = $PA['fieldConf']['config'];
                     $params['field'] = $field;
                     $params['table'] = $table;
                     $params['flexFormPath'] = $flexFormPath;