[TASK] Provide update wizard for ext:compatibility6 91/44491/6
authorFrank Nägler <frank.naegler@typo3.org>
Mon, 2 Nov 2015 22:21:15 +0000 (23:21 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 6 Nov 2015 16:46:26 +0000 (17:46 +0100)
Remove the extension at the same time.

Resolves: #68083
Releases: master
Change-Id: I982ba2b115d7670c00f2e55c2e4573e2c4ccd298
Reviewed-on: https://review.typo3.org/44491
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
52 files changed:
typo3/sysext/compatibility6/Classes/Configuration/FlexForm/FlexFormTools.php [deleted file]
typo3/sysext/compatibility6/Classes/ContentObject/ClearGifContentObject.php [deleted file]
typo3/sysext/compatibility6/Classes/ContentObject/ColumnsContentObject.php [deleted file]
typo3/sysext/compatibility6/Classes/ContentObject/ContentTableContentObject.php [deleted file]
typo3/sysext/compatibility6/Classes/ContentObject/FormContentObject.php [deleted file]
typo3/sysext/compatibility6/Classes/ContentObject/HorizontalRulerContentObject.php [deleted file]
typo3/sysext/compatibility6/Classes/ContentObject/ImageTextContentObject.php [deleted file]
typo3/sysext/compatibility6/Classes/ContentObject/OffsetTableContentObject.php [deleted file]
typo3/sysext/compatibility6/Classes/ContentObject/SearchResultContentObject.php [deleted file]
typo3/sysext/compatibility6/Classes/ContentObject/TableRenderer.php [deleted file]
typo3/sysext/compatibility6/Classes/Controller/FormDataSubmissionController.php [deleted file]
typo3/sysext/compatibility6/Classes/Controller/WebFunctionWizardsBaseController.php [deleted file]
typo3/sysext/compatibility6/Classes/Controller/Wizard/FormsController.php [deleted file]
typo3/sysext/compatibility6/Classes/Form/Container/FlexFormElementContainer.php [deleted file]
typo3/sysext/compatibility6/Classes/Form/Container/FlexFormEntryContainer.php [deleted file]
typo3/sysext/compatibility6/Classes/Form/Container/FlexFormNoTabsContainer.php [deleted file]
typo3/sysext/compatibility6/Classes/Form/Container/FlexFormTabsContainer.php [deleted file]
typo3/sysext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php [deleted file]
typo3/sysext/compatibility6/Classes/Hooks/ExtTablesPostProcessing/TcaMigration.php [deleted file]
typo3/sysext/compatibility6/Classes/Hooks/PageLayoutView/MailformPreviewRenderer.php [deleted file]
typo3/sysext/compatibility6/Classes/Hooks/PageLayoutView/ScriptPreviewRenderer.php [deleted file]
typo3/sysext/compatibility6/Classes/Hooks/TypoScriptFrontendController/ContentPostProcHook.php [deleted file]
typo3/sysext/compatibility6/Classes/Template/FrontendDocumentTemplate.php [deleted file]
typo3/sysext/compatibility6/Classes/Utility/FormUtility.php [deleted file]
typo3/sysext/compatibility6/Configuration/Backend/Routes.php [deleted file]
typo3/sysext/compatibility6/Configuration/TCA/Overrides/pages.php [deleted file]
typo3/sysext/compatibility6/Configuration/TCA/Overrides/tt_content.php [deleted file]
typo3/sysext/compatibility6/Configuration/TypoScript/Form/constants.txt [deleted file]
typo3/sysext/compatibility6/Configuration/TypoScript/Form/setup.txt [deleted file]
typo3/sysext/compatibility6/Configuration/TypoScript/Search/constants.txt [deleted file]
typo3/sysext/compatibility6/Configuration/TypoScript/Search/setup.txt [deleted file]
typo3/sysext/compatibility6/Migrations/Code/ClassAliasMap.php [deleted file]
typo3/sysext/compatibility6/Migrations/Code/LegacyClassesForIde.php [deleted file]
typo3/sysext/compatibility6/Resources/Private/Language/extensionmanager.xlf [deleted file]
typo3/sysext/compatibility6/Resources/Private/Language/locallang.xlf [deleted file]
typo3/sysext/compatibility6/Resources/Private/Language/locallang_ttc.xlf [deleted file]
typo3/sysext/compatibility6/Resources/Private/Language/locallang_wizards.xlf [deleted file]
typo3/sysext/compatibility6/Resources/Private/Language/wizards.xlf [deleted file]
typo3/sysext/compatibility6/Resources/Private/Language/wizards_csh.xlf [deleted file]
typo3/sysext/compatibility6/Resources/Private/Templates/Wizard/Forms.html [deleted file]
typo3/sysext/compatibility6/Resources/Public/Images/wizard_link.gif [deleted file]
typo3/sysext/compatibility6/Resources/Public/JavaScript/jsfunc.validateform.js [deleted file]
typo3/sysext/compatibility6/Tests/Unit/Form/FormDataProvider/TcaFlexProcessTest.php [deleted file]
typo3/sysext/compatibility6/composer.json [deleted file]
typo3/sysext/compatibility6/ext_conf_template.txt [deleted file]
typo3/sysext/compatibility6/ext_emconf.php [deleted file]
typo3/sysext/compatibility6/ext_icon.png [deleted file]
typo3/sysext/compatibility6/ext_localconf.php [deleted file]
typo3/sysext/compatibility6/ext_tables.php [deleted file]
typo3/sysext/compatibility6/ext_tables.sql [deleted file]
typo3/sysext/install/Classes/Updates/Compatibility6ExtractionUpdate.php [new file with mode: 0644]
typo3/sysext/install/ext_localconf.php

diff --git a/typo3/sysext/compatibility6/Classes/Configuration/FlexForm/FlexFormTools.php b/typo3/sysext/compatibility6/Classes/Configuration/FlexForm/FlexFormTools.php
deleted file mode 100644 (file)
index 509e4e4..0000000
+++ /dev/null
@@ -1,419 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Configuration\FlexForm;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Contains functions for manipulating flex form data
- */
-class FlexFormTools
-{
-    /**
-     * If set, the charset of data XML is converted to system charset.
-     *
-     * @var bool
-     */
-    public $convertCharset = false;
-
-    /**
-     * If set, section indexes are re-numbered before processing
-     *
-     * @var bool
-     */
-    public $reNumberIndexesOfSectionData = false;
-
-    /**
-     * Contains data structure when traversing flexform
-     *
-     * @var array
-     */
-    public $traverseFlexFormXMLData_DS = array();
-
-    /**
-     * Contains data array when traversing flexform
-     *
-     * @var array
-     */
-    public $traverseFlexFormXMLData_Data = array();
-
-    /**
-     * Options for array2xml() for flexform.
-     * This will map the weird keys from the internal array to tags that could potentially be checked with a DTD/schema
-     *
-     * @var array
-     */
-    public $flexArray2Xml_options = array(
-        'parentTagMap' => array(
-            'data' => 'sheet',
-            'sheet' => 'language',
-            'language' => 'field',
-            'el' => 'field',
-            'field' => 'value',
-            'field:el' => 'el',
-            'el:_IS_NUM' => 'section',
-            'section' => 'itemType'
-        ),
-        'disableTypeAttrib' => 2
-    );
-
-    /**
-     * Reference to object called
-     *
-     * @var object
-     */
-    public $callBackObj = null;
-
-    /**
-     * Used for accumulation of clean XML
-     *
-     * @var array
-     */
-    public $cleanFlexFormXML = array();
-
-    /**
-     * Handler for Flex Forms
-     *
-     * @param string $table The table name of the record
-     * @param string $field The field name of the flexform field to work on
-     * @param array $row The record data array
-     * @param object $callBackObj Object in which the call back function is located
-     * @param string $callBackMethod_value Method name of call back function in object for values
-     * @return bool|string If TRUE, error happened (error string returned)
-     */
-    public function traverseFlexFormXMLData($table, $field, $row, $callBackObj, $callBackMethod_value)
-    {
-        if (!is_array($GLOBALS['TCA'][$table]) || !is_array($GLOBALS['TCA'][$table]['columns'][$field])) {
-            return 'TCA table/field was not defined.';
-        }
-        $this->callBackObj = $callBackObj;
-        // Get Data Structure:
-        $dataStructArray = BackendUtility::getFlexFormDS($GLOBALS['TCA'][$table]['columns'][$field]['config'], $row, $table, $field);
-        // If data structure was ok, proceed:
-        if (is_array($dataStructArray)) {
-            // Get flexform XML data:
-            $xmlData = $row[$field];
-            // Convert charset:
-            if ($this->convertCharset) {
-                $xmlHeaderAttributes = GeneralUtility::xmlGetHeaderAttribs($xmlData);
-                $storeInCharset = strtolower($xmlHeaderAttributes['encoding']);
-                if ($storeInCharset) {
-                    $currentCharset = $GLOBALS['LANG']->charSet;
-                    $xmlData = $GLOBALS['LANG']->csConvObj->conv($xmlData, $storeInCharset, $currentCharset, 1);
-                }
-            }
-            $editData = GeneralUtility::xml2array($xmlData);
-            if (!is_array($editData)) {
-                return 'Parsing error: ' . $editData;
-            }
-            // Language settings:
-            $langChildren = $dataStructArray['meta']['langChildren'] ? 1 : 0;
-            $langDisabled = $dataStructArray['meta']['langDisable'] ? 1 : 0;
-            // Empty or invalid <meta>
-            if (!is_array($editData['meta'])) {
-                $editData['meta'] = array();
-            }
-            $editData['meta']['currentLangId'] = array();
-            $languages = $this->getAvailableLanguages();
-            foreach ($languages as $lInfo) {
-                $editData['meta']['currentLangId'][] = $lInfo['ISOcode'];
-            }
-            if (empty($editData['meta']['currentLangId'])) {
-                $editData['meta']['currentLangId'] = array('DEF');
-            }
-            $editData['meta']['currentLangId'] = array_unique($editData['meta']['currentLangId']);
-            if ($langChildren || $langDisabled) {
-                $lKeys = array('DEF');
-            } else {
-                $lKeys = $editData['meta']['currentLangId'];
-            }
-            // Tabs sheets
-            if (is_array($dataStructArray['sheets'])) {
-                $sKeys = array_keys($dataStructArray['sheets']);
-            } else {
-                $sKeys = array('sDEF');
-            }
-            // Traverse languages:
-            foreach ($lKeys as $lKey) {
-                foreach ($sKeys as $sheet) {
-                    $sheetCfg = $dataStructArray['sheets'][$sheet];
-                    list($dataStruct, $sheet) = GeneralUtility::resolveSheetDefInDS($dataStructArray, $sheet);
-                    // Render sheet:
-                    if (is_array($dataStruct['ROOT']) && is_array($dataStruct['ROOT']['el'])) {
-                        // Separate language key
-                        $lang = 'l' . $lKey;
-                        $PA['vKeys'] = $langChildren && !$langDisabled ? $editData['meta']['currentLangId'] : array('DEF');
-                        $PA['lKey'] = $lang;
-                        $PA['callBackMethod_value'] = $callBackMethod_value;
-                        $PA['table'] = $table;
-                        $PA['field'] = $field;
-                        $PA['uid'] = $row['uid'];
-                        $this->traverseFlexFormXMLData_DS = &$dataStruct;
-                        $this->traverseFlexFormXMLData_Data = &$editData;
-                        // Render flexform:
-                        $this->traverseFlexFormXMLData_recurse($dataStruct['ROOT']['el'], $editData['data'][$sheet][$lang], $PA, 'data/' . $sheet . '/' . $lang);
-                    } else {
-                        return 'Data Structure ERROR: No ROOT element found for sheet "' . $sheet . '".';
-                    }
-                }
-            }
-        } else {
-            return 'Data Structure ERROR: ' . $dataStructArray;
-        }
-    }
-
-    /**
-     * Recursively traversing flexform data according to data structure and element data
-     *
-     * @param array $dataStruct (Part of) data structure array that applies to the sub section of the flexform data we are processing
-     * @param array $editData (Part of) edit data array, reflecting current part of data structure
-     * @param array $PA Additional parameters passed.
-     * @param string $path Telling the "path" to the element in the flexform XML
-     * @return array
-     */
-    public function traverseFlexFormXMLData_recurse($dataStruct, $editData, &$PA, $path = '')
-    {
-        if (is_array($dataStruct)) {
-            foreach ($dataStruct as $key => $value) {
-                // The value of each entry must be an array.
-                if (is_array($value)) {
-                    if ($value['type'] == 'array') {
-                        // Array (Section) traversal
-                        if ($value['section']) {
-                            $cc = 0;
-                            if (is_array($editData[$key]['el'])) {
-                                if ($this->reNumberIndexesOfSectionData) {
-                                    $temp = array();
-                                    $c3 = 0;
-                                    foreach ($editData[$key]['el'] as $v3) {
-                                        $temp[++$c3] = $v3;
-                                    }
-                                    $editData[$key]['el'] = $temp;
-                                }
-                                foreach ($editData[$key]['el'] as $k3 => $v3) {
-                                    if (is_array($v3)) {
-                                        $cc = $k3;
-                                        $theType = key($v3);
-                                        $theDat = $v3[$theType];
-                                        $newSectionEl = $value['el'][$theType];
-                                        if (is_array($newSectionEl)) {
-                                            $this->traverseFlexFormXMLData_recurse(array($theType => $newSectionEl), array($theType => $theDat), $PA, $path . '/' . $key . '/el/' . $cc);
-                                        }
-                                    }
-                                }
-                            }
-                        } else {
-                            // Array traversal
-                            if (is_array($editData) && is_array($editData[$key])) {
-                                $this->traverseFlexFormXMLData_recurse($value['el'], $editData[$key]['el'], $PA, $path . '/' . $key . '/el');
-                            }
-                        }
-                    } elseif (is_array($value['TCEforms']['config'])) {
-                        // Processing a field value:
-                        foreach ($PA['vKeys'] as $vKey) {
-                            $vKey = 'v' . $vKey;
-                            // Call back
-                            if ($PA['callBackMethod_value'] && is_array($editData) && is_array($editData[$key])) {
-                                $this->executeCallBackMethod($PA['callBackMethod_value'], array($value, $editData[$key][$vKey], $PA, $path . '/' . $key . '/' . $vKey, $this));
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Execute method on callback object
-     *
-     * @param string $methodName Method name to call
-     * @param array $parameterArray Parameters
-     * @return mixed Result of callback object
-     */
-    protected function executeCallBackMethod($methodName, array $parameterArray)
-    {
-        return call_user_func_array(array($this->callBackObj, $methodName), $parameterArray);
-    }
-
-    /**
-     * Returns an array of available languages to use for FlexForm operations
-     *
-     * @return array
-     */
-    public function getAvailableLanguages()
-    {
-        $isL = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables');
-        // Find all language records in the system
-        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
-            'language_isocode,static_lang_isocode,title,uid',
-            'sys_language',
-            'pid=0' . BackendUtility::deleteClause('sys_language'),
-            '',
-            'title'
-        );
-        // Traverse them
-        $output = array();
-        $output[0] = array(
-            'uid' => 0,
-            'title' => 'Default language',
-            'ISOcode' => 'DEF'
-        );
-        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-            $output[$row['uid']] = $row;
-            if (!empty($row['language_isocode'])) {
-                $output[$row['uid']]['ISOcode'] = $row['language_isocode'];
-            } elseif ($isL && $row['static_lang_isocode']) {
-                \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('Usage of the field "static_lang_isocode" is discouraged, and will stop working with CMS 8. Use the built-in language field "language_isocode" in your sys_language records.');
-                $rr = BackendUtility::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
-                if ($rr['lg_iso_2']) {
-                    $output[$row['uid']]['ISOcode'] = $rr['lg_iso_2'];
-                }
-            }
-            if (!$output[$row['uid']]['ISOcode']) {
-                unset($output[$row['uid']]);
-            }
-        }
-        $GLOBALS['TYPO3_DB']->sql_free_result($res);
-        return $output;
-    }
-
-    /***********************************
-     *
-     * Processing functions
-     *
-     ***********************************/
-    /**
-     * Cleaning up FlexForm XML to hold only the values it may according to its Data Structure. Also the order of tags will follow that of the data structure.
-     * BE CAREFUL: DO not clean records in workspaces unless IN the workspace! The Data Structure might resolve falsely on a workspace record when cleaned from Live workspace.
-     *
-     * @param string $table Table name
-     * @param string $field Field name of the flex form field in which the XML is found that should be cleaned.
-     * @param array $row The record
-     * @return string Clean XML from FlexForm field
-     */
-    public function cleanFlexFormXML($table, $field, $row)
-    {
-        // New structure:
-        $this->cleanFlexFormXML = array();
-        // Create and call iterator object:
-        $flexObj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::class);
-        $flexObj->reNumberIndexesOfSectionData = true;
-        $flexObj->traverseFlexFormXMLData($table, $field, $row, $this, 'cleanFlexFormXML_callBackFunction');
-        return $this->flexArray2Xml($this->cleanFlexFormXML, true);
-    }
-
-    /**
-     * Call back function for \TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools class
-     * Basically just setting the value in a new array (thus cleaning because only values that are valid are visited!)
-     *
-     * @param array $dsArr Data structure for the current value
-     * @param mixed $data Current value
-     * @param array $PA Additional configuration used in calling function
-     * @param string $path Path of value in DS structure
-     * @param FlexFormTools $pObj caller
-     * @return void
-     */
-    public function cleanFlexFormXML_callBackFunction($dsArr, $data, $PA, $path, $pObj)
-    {
-        // Just setting value in our own result array, basically replicating the structure:
-        $pObj->setArrayValueByPath($path, $this->cleanFlexFormXML, $data);
-        // Looking if an "extension" called ".vDEFbase" is found and if so, accept that too:
-        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase']) {
-            $vDEFbase = $pObj->getArrayValueByPath($path . '.vDEFbase', $pObj->traverseFlexFormXMLData_Data);
-            if (isset($vDEFbase)) {
-                $pObj->setArrayValueByPath($path . '.vDEFbase', $this->cleanFlexFormXML, $vDEFbase);
-            }
-        }
-    }
-
-    /***********************************
-     *
-     * Multi purpose functions
-     *
-     ***********************************/
-    /**
-     * Get a value from a multi-dimensional array by giving a path "../../.." pointing to the element
-     *
-     * @param string $pathArray The path pointing to the value field, eg. test/2/title to access $array['test'][2]['title']
-     * @param array $array Array to get value from. Passed by reference so the value returned can be used to change the value in the array!
-     * @return mixed Value returned
-     */
-    public function &getArrayValueByPath($pathArray, &$array)
-    {
-        if (!is_array($pathArray)) {
-            $pathArray = explode('/', $pathArray);
-        }
-        if (is_array($array) && !empty($pathArray)) {
-            $key = array_shift($pathArray);
-            if (isset($array[$key])) {
-                if (empty($pathArray)) {
-                    return $array[$key];
-                }
-                return $this->getArrayValueByPath($pathArray, $array[$key]);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Set a value in a multi-dimensional array by giving a path "../../.." pointing to the element
-     *
-     * @param string $pathArray The path pointing to the value field, eg. test/2/title to access $array['test'][2]['title']
-     * @param array $array Array to set value in. Passed by reference so the value returned can be used to change the value in the array!
-     * @param mixed $value Value to set
-     * @return mixed Value returned
-     */
-    public function setArrayValueByPath($pathArray, &$array, $value)
-    {
-        if (isset($value)) {
-            if (!is_array($pathArray)) {
-                $pathArray = explode('/', $pathArray);
-            }
-            if (is_array($array) && !empty($pathArray)) {
-                $key = array_shift($pathArray);
-                if (empty($pathArray)) {
-                    $array[$key] = $value;
-                    return true;
-                }
-                if (!isset($array[$key])) {
-                    $array[$key] = array();
-                }
-                return $this->setArrayValueByPath($pathArray, $array[$key], $value);
-            }
-        }
-    }
-
-    /**
-     * Convert FlexForm data array to XML
-     *
-     * @param array $array Array to output in <T3FlexForms> XML
-     * @param bool $addPrologue If set, the XML prologue is returned as well.
-     * @return string XML content.
-     */
-    public function flexArray2Xml($array, $addPrologue = false)
-    {
-        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['flexformForceCDATA']) {
-            $this->flexArray2Xml_options['useCDATA'] = 1;
-        }
-        $options = $GLOBALS['TYPO3_CONF_VARS']['BE']['niceFlexFormXMLtags'] ? $this->flexArray2Xml_options : array();
-        $spaceInd = $GLOBALS['TYPO3_CONF_VARS']['BE']['compactFlexFormXML'] ? -1 : 4;
-        $output = GeneralUtility::array2xml($array, '', 0, 'T3FlexForms', $spaceInd, $options);
-        if ($addPrologue) {
-            $output = '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>' . LF . $output;
-        }
-        return $output;
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/ContentObject/ClearGifContentObject.php b/typo3/sysext/compatibility6/Classes/ContentObject/ClearGifContentObject.php
deleted file mode 100644 (file)
index 0a32244..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\ContentObject;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Contains CLEARGIF class object.
- */
-class ClearGifContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
-{
-    /**
-     * Rendering the cObject, CLEARGIF
-     *
-     * @param array $conf Array of TypoScript properties
-     * @return string Output
-     */
-    public function render($conf = array())
-    {
-        $width = isset($conf['width.']) ? $this->cObj->stdWrap($conf['width'], $conf['width.']) : $conf['width'];
-        if (!$width) {
-            $width = 1;
-        }
-        $height = isset($conf['height.']) ? $this->cObj->stdWrap($conf['height'], $conf['height.']) : $conf['height'];
-        if (!$height) {
-            $height = 1;
-        }
-        $wrap = isset($conf['wrap.']) ? $this->cObj->stdWrap($conf['wrap'], $conf['wrap.']) : $conf['wrap'];
-        if (!$wrap) {
-            $wrap = '|<br />';
-        }
-        $theValue = $this->cObj->wrap('<span style="width: ' . $width . 'px; height: ' . $height . 'px;"></span>', $wrap);
-        if (isset($conf['stdWrap.'])) {
-            $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
-        }
-        return $theValue;
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/ContentObject/ColumnsContentObject.php b/typo3/sysext/compatibility6/Classes/ContentObject/ColumnsContentObject.php
deleted file mode 100644 (file)
index 2db1d23..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\ContentObject;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Contains COLUMNS content object.
- */
-class ColumnsContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
-{
-    /**
-     * Rendering the cObject, COLUMNS
-     *
-     * @param array $conf Array of TypoScript properties
-     * @return string Output
-     */
-    public function render($conf = array())
-    {
-        if (empty($conf) || !empty($conf['if.']) && !$this->cObj->checkIf($conf['if.'])) {
-            return '';
-        }
-
-        $content = '';
-
-        $tdRowCount = 0;
-        $tableParams = isset($conf['tableParams.']) ? $this->cObj->stdWrap($conf['tableParams'], $conf['tableParams.']) : $conf['tableParams'];
-        $tableParams = $tableParams ? ' ' . $tableParams : ' border="0" cellspacing="0" cellpadding="0"';
-        $TDparams = isset($conf['TDParams.']) ? $this->cObj->stdWrap($conf['TDParams'], $conf['TDParams.']) : $conf['TDParams'];
-        $TDparams = $TDparams ? ' ' . $TDparams : ' valign="top"';
-        $rows = isset($conf['rows.']) ? $this->cObj->stdWrap($conf['rows'], $conf['rows.']) : $conf['rows'];
-        $rows = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($rows, 2, 20);
-        $totalWidth = isset($conf['totalWidth.']) ? (int)$this->cObj->stdWrap($conf['totalWidth'], $conf['totalWidth.']) : (int)$conf['totalWidth'];
-        $totalGapWidth = 0;
-        $gapData = array(
-            'gapWidth' => isset($conf['gapWidth.']) ? $this->cObj->stdWrap($conf['gapWidth'], $conf['gapWidth.']) : $conf['gapWidth'],
-            'gapBgCol' => isset($conf['gapBgCol.']) ? $this->cObj->stdWrap($conf['gapBgCol'], $conf['gapBgCol.']) : $conf['gapBgCol'],
-            'gapLineThickness' => isset($conf['gapLineThickness.']) ? $this->cObj->stdWrap($conf['gapLineThickness'], $conf['gapLineThickness.']) : $conf['gapLineThickness'],
-            'gapLineCol' => isset($conf['gapLineCol.']) ? $this->cObj->stdWrap($conf['gapLineCol'], $conf['gapLineCol.']) : $conf['gapLineCol']
-        );
-        $gapData = $GLOBALS['TSFE']->tmpl->splitConfArray($gapData, $rows - 1);
-        foreach ($gapData as $val) {
-            $totalGapWidth += (int)$val['gapWidth'];
-        }
-        if ($totalWidth) {
-            $columnWidth = ceil(($totalWidth - $totalGapWidth) / $rows);
-            $TDparams .= ' width="' . $columnWidth . '"';
-            $tableParams .= ' width="' . $totalWidth . '"';
-        } else {
-            $TDparams .= ' width="' . floor(100 / $rows) . '%"';
-            $tableParams .= ' width="100%"';
-        }
-        for ($a = 1; $a <= $rows; $a++) {
-            $tdRowCount++;
-            $content .= '<td' . $TDparams . '>';
-            $content .= $this->cObj->cObjGetSingle($conf[$a], $conf[$a . '.'], $a);
-            $content .= '</td>';
-            if ($a < $rows) {
-                $gapConf = $gapData[$a - 1];
-                $gapWidth = (int)$gapConf['gapWidth'];
-                if ($gapWidth) {
-                    $tdPar = $gapConf['gapBgCol'] ? ' bgcolor="' . $gapConf['gapBgCol'] . '"' : '';
-                    $gapLine = (int)$gapConf['gapLineThickness'];
-                    if ($gapLine) {
-                        $gapSurround = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(($gapWidth - $gapLine) / 2, 1, 1000);
-                        // right gap
-                        $content .= '<td' . $tdPar . '><span style="width: ' . $gapSurround . 'px; height: 1px;"></span></td>';
-                        $tdRowCount++;
-                        // line:
-                        $GtdPar = $gapConf['gapLineCol'] ? ' bgcolor="' . $gapConf['gapLineCol'] . '"' : ' bgcolor="black"';
-                        $content .= '<td' . $GtdPar . '><span style="width: ' . $gapLine . 'px; height: 1px;"></span></td>';
-                        $tdRowCount++;
-                        // left gap
-                        $content .= '<td' . $tdPar . '><span style="width: ' . $gapSurround . 'px; height: 1px;"></span></td>';
-                        $tdRowCount++;
-                    } else {
-                        $content .= '<td' . $tdPar . '><span style="width: ' . $gapWidth . 'px; height: 1px;"></span></td>';
-                        $tdRowCount++;
-                    }
-                }
-            }
-        }
-        $content = '<tr>' . $content . '</tr>';
-        $content = '<table' . $tableParams . '>' . $content . '</table>';
-        if ($conf['after'] || isset($conf['after.'])) {
-            $content .= $this->cObj->cObjGetSingle($conf['after'], $conf['after.'], 'after');
-        }
-        if (isset($conf['stdWrap.'])) {
-            $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
-        }
-        return $content;
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/ContentObject/ContentTableContentObject.php b/typo3/sysext/compatibility6/Classes/ContentObject/ContentTableContentObject.php
deleted file mode 100644 (file)
index 8a5ec04..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\ContentObject;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Contains CTABLE content object.
- */
-class ContentTableContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
-{
-    /**
-     * Rendering the cObject, CTABLE
-     *
-     * @param array $conf Array of TypoScript properties
-     * @return string Output
-     */
-    public function render($conf = array())
-    {
-        $controlTable = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(TableRenderer::class);
-        $tableParams = isset($conf['tableParams.']) ? $this->cObj->stdWrap($conf['tableParams'], $conf['tableParams.']) : $conf['tableParams'];
-        if ($tableParams) {
-            $controlTable->tableParams = $tableParams;
-        }
-        // loads the pagecontent
-        $conf['cWidth'] = isset($conf['cWidth.']) ? $this->cObj->stdWrap($conf['cWidth'], $conf['cWidth.']) : $conf['cWidth'];
-        $controlTable->contentW = $conf['cWidth'];
-        // loads the menues if any
-        if (is_array($conf['c.'])) {
-            $controlTable->content = $this->cObj->cObjGet($conf['c.'], 'c.');
-            $contentTDParams = isset($conf['c.']['TDParams.']) ? $this->cObj->stdWrap($conf['c.']['TDParams'], $conf['c.']['TDParams.']) : $conf['c.']['TDParams'];
-            $controlTable->contentTDparams = isset($contentTDParams) ? $contentTDParams : 'valign="top"';
-        }
-        if (is_array($conf['lm.'])) {
-            $controlTable->lm = $this->cObj->cObjGet($conf['lm.'], 'lm.');
-            $lmTDParams = isset($conf['lm.']['TDParams.']) ? $this->cObj->stdWrap($conf['lm.']['TDParams'], $conf['lm.']['TDParams.']) : $conf['lm.']['TDParams'];
-            $controlTable->lmTDparams = isset($lmTDParams) ? $lmTDParams : 'valign="top"';
-        }
-        if (is_array($conf['tm.'])) {
-            $controlTable->tm = $this->cObj->cObjGet($conf['tm.'], 'tm.');
-            $tmTDParams = isset($conf['tm.']['TDParams.']) ? $this->cObj->stdWrap($conf['tm.']['TDParams'], $conf['tm.']['TDParams.']) : $conf['tm.']['TDParams'];
-            $controlTable->tmTDparams = isset($tmTDParams) ? $tmTDParams : 'valign="top"';
-        }
-        if (is_array($conf['rm.'])) {
-            $controlTable->rm = $this->cObj->cObjGet($conf['rm.'], 'rm.');
-            $rmTDParams = isset($conf['rm.']['TDParams.']) ? $this->cObj->stdWrap($conf['rm.']['TDParams'], $conf['rm.']['TDParams.']) : $conf['rm.']['TDParams'];
-            $controlTable->rmTDparams = isset($rmTDParams) ? $rmTDParams : 'valign="top"';
-        }
-        if (is_array($conf['bm.'])) {
-            $controlTable->bm = $this->cObj->cObjGet($conf['bm.'], 'bm.');
-            $bmTDParams = isset($conf['bm.']['TDParams.']) ? $this->cObj->stdWrap($conf['bm.']['TDParams'], $conf['bm.']['TDParams.']) : $conf['bm.']['TDParams'];
-            $controlTable->bmTDparams = isset($bmTDParams) ? $bmTDParams : 'valign="top"';
-        }
-        $conf['offset'] = isset($conf['offset.']) ? $this->cObj->stdWrap($conf['offset'], $conf['offset.']) : $conf['offset'];
-        $conf['cMargins'] = isset($conf['cMargins.']) ? $this->cObj->stdWrap($conf['cMargins'], $conf['cMargins.']) : $conf['cMargins'];
-        $theValue = $controlTable->start($conf['offset'], $conf['cMargins']);
-        if (isset($conf['stdWrap.'])) {
-            $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
-        }
-        return $theValue;
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/ContentObject/FormContentObject.php b/typo3/sysext/compatibility6/Classes/ContentObject/FormContentObject.php
deleted file mode 100644 (file)
index 6ae4b54..0000000
+++ /dev/null
@@ -1,661 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\ContentObject;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Contains FORM class object.
- */
-class FormContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
-{
-    /**
-     * Rendering the cObject, FORM
-     *
-     * Note on $formData:
-     * In the optional $formData array each entry represents a line in the ordinary setup.
-     * In those entries each entry (0,1,2...) represents a space normally divided by the '|' line.
-     *
-     * $formData [] = array('Name:', 'name=input, 25 ', 'Default value....');
-     * $formData [] = array('Email:', 'email=input, 25 ', 'Default value for email....');
-     *
-     * - corresponds to the $conf['data'] value being :
-     * Name:|name=input, 25 |Default value....||Email:|email=input, 25 |Default value for email....
-     *
-     * If $formData is an array the value of $conf['data'] is ignored.
-     *
-     * @param array $conf Array of TypoScript properties
-     * @param array $formData Alternative formdata overriding whatever comes from TypoScript
-     * @return string Output
-     */
-    public function render($conf = array(), $formData = '')
-    {
-        $content = '';
-        if (is_array($formData)) {
-            $dataArray = $formData;
-        } else {
-            $data = isset($conf['data.']) ? $this->cObj->stdWrap($conf['data'], $conf['data.']) : $conf['data'];
-            // Clearing dataArr
-            $dataArray = array();
-            // Getting the original config
-            if (trim($data)) {
-                $data = str_replace(LF, '||', $data);
-                $dataArray = explode('||', $data);
-            }
-            // Adding the new dataArray config form:
-            if (is_array($conf['dataArray.'])) {
-                // dataArray is supplied
-                $sortedKeyArray = \TYPO3\CMS\Core\TypoScript\TemplateService::sortedKeyList($conf['dataArray.'], true);
-                foreach ($sortedKeyArray as $theKey) {
-                    $singleKeyArray = $conf['dataArray.'][$theKey . '.'];
-                    if (is_array($singleKeyArray)) {
-                        $temp = array();
-                        $label = isset($singleKeyArray['label.']) ? $this->cObj->stdWrap($singleKeyArray['label'], $singleKeyArray['label.']) : $singleKeyArray['label'];
-                        list($temp[0]) = explode('|', $label);
-                        $type = isset($singleKeyArray['type.']) ? $this->cObj->stdWrap($singleKeyArray['type'], $singleKeyArray['type.']) : $singleKeyArray['type'];
-                        list($temp[1]) = explode('|', $type);
-                        $required = isset($singleKeyArray['required.']) ? $this->cObj->stdWrap($singleKeyArray['required'], $singleKeyArray['required.']) : $singleKeyArray['required'];
-                        if ($required) {
-                            $temp[1] = '*' . $temp[1];
-                        }
-                        $singleValue = isset($singleKeyArray['value.']) ? $this->cObj->stdWrap($singleKeyArray['value'], $singleKeyArray['value.']) : $singleKeyArray['value'];
-                        list($temp[2]) = explode('|', $singleValue);
-                        // If value array is set, then implode those values.
-                        if (is_array($singleKeyArray['valueArray.'])) {
-                            $temp_accumulated = array();
-                            foreach ($singleKeyArray['valueArray.'] as $singleKey => $singleKey_valueArray) {
-                                if (is_array($singleKey_valueArray) && (int)$singleKey . '.' === (string)$singleKey) {
-                                    $temp_valueArray = array();
-                                    $valueArrayLabel = isset($singleKey_valueArray['label.']) ? $this->cObj->stdWrap($singleKey_valueArray['label'], $singleKey_valueArray['label.']) : $singleKey_valueArray['label'];
-                                    list($temp_valueArray[0]) = explode('=', $valueArrayLabel);
-                                    $selected = isset($singleKey_valueArray['selected.']) ? $this->cObj->stdWrap($singleKey_valueArray['selected'], $singleKey_valueArray['selected.']) : $singleKey_valueArray['selected'];
-                                    if ($selected) {
-                                        $temp_valueArray[0] = '*' . $temp_valueArray[0];
-                                    }
-                                    $singleKeyValue = isset($singleKey_valueArray['value.']) ? $this->cObj->stdWrap($singleKey_valueArray['value'], $singleKey_valueArray['value.']) : $singleKey_valueArray['value'];
-                                    list($temp_valueArray[1]) = explode(',', $singleKeyValue);
-                                }
-                                $temp_accumulated[] = implode('=', $temp_valueArray);
-                            }
-                            $temp[2] = implode(',', $temp_accumulated);
-                        }
-                        $specialEval = isset($singleKeyArray['specialEval.']) ? $this->cObj->stdWrap($singleKeyArray['specialEval'], $singleKeyArray['specialEval.']) : $singleKeyArray['specialEval'];
-                        list($temp[3]) = explode('|', $specialEval);
-                        // Adding the form entry to the dataArray
-                        $dataArray[] = implode('|', $temp);
-                    }
-                }
-            }
-        }
-        $attachmentCounter = '';
-        $hiddenfields = '';
-        $fieldlist = array();
-        $propertyOverride = array();
-        $fieldname_hashArray = array();
-        $counter = 0;
-        $xhtmlStrict = GeneralUtility::inList('xhtml_strict,xhtml_11,xhtml_2', $GLOBALS['TSFE']->xhtmlDoctype);
-        // Formname
-        $formName = isset($conf['formName.']) ? $this->cObj->stdWrap($conf['formName'], $conf['formName.']) : $conf['formName'];
-        $formName = $this->cleanFormName($formName);
-        $formName = $GLOBALS['TSFE']->getUniqueId($formName);
-
-        $fieldPrefix = isset($conf['fieldPrefix.']) ? $this->cObj->stdWrap($conf['fieldPrefix'], $conf['fieldPrefix.']) : $conf['fieldPrefix'];
-        if (isset($conf['fieldPrefix']) || isset($conf['fieldPrefix.'])) {
-            if ($fieldPrefix) {
-                $prefix = $this->cleanFormName($fieldPrefix);
-            } else {
-                $prefix = '';
-            }
-        } else {
-            $prefix = $formName;
-        }
-        foreach ($dataArray as $dataValue) {
-            $counter++;
-            $confData = array();
-            if (is_array($formData)) {
-                $parts = $dataValue;
-                // TRUE...
-                $dataValue = 1;
-            } else {
-                $dataValue = trim($dataValue);
-                $parts = explode('|', $dataValue);
-            }
-            if ($dataValue && strcspn($dataValue, '#/')) {
-                // label:
-                $confData['label'] = GeneralUtility::removeXSS(trim($parts[0]));
-                // field:
-                $fParts = explode(',', $parts[1]);
-                $fParts[0] = trim($fParts[0]);
-                if ($fParts[0][0] === '*') {
-                    $confData['required'] = 1;
-                    $fParts[0] = substr($fParts[0], 1);
-                }
-                $typeParts = explode('=', $fParts[0]);
-                $confData['type'] = trim(strtolower(end($typeParts)));
-                if (count($typeParts) === 1) {
-                    $confData['fieldname'] = $this->cleanFormName($parts[0]);
-                    if (strtolower(preg_replace('/[^[:alnum:]]/', '', $confData['fieldname'])) == 'email') {
-                        $confData['fieldname'] = 'email';
-                    }
-                    // Duplicate fieldnames resolved
-                    if (isset($fieldname_hashArray[md5($confData['fieldname'])])) {
-                        $confData['fieldname'] .= '_' . $counter;
-                    }
-                    $fieldname_hashArray[md5($confData['fieldname'])] = $confData['fieldname'];
-                    // Attachment names...
-                    if ($confData['type'] == 'file') {
-                        $confData['fieldname'] = 'attachment' . $attachmentCounter;
-                        $attachmentCounter = (int)$attachmentCounter + 1;
-                    }
-                } else {
-                    $confData['fieldname'] = str_replace(' ', '_', trim($typeParts[0]));
-                }
-                $confData['fieldname'] = htmlspecialchars($confData['fieldname']);
-                $fieldCode = '';
-                $wrapFieldName = isset($conf['wrapFieldName']) ? $this->cObj->stdWrap($conf['wrapFieldName'], $conf['wrapFieldName.']) : $conf['wrapFieldName'];
-                if ($wrapFieldName) {
-                    $confData['fieldname'] = $this->cObj->wrap($confData['fieldname'], $wrapFieldName);
-                }
-                // Set field name as current:
-                $this->cObj->setCurrentVal($confData['fieldname']);
-                // Additional parameters
-                if (trim($confData['type'])) {
-                    if (isset($conf['params.'][$confData['type']])) {
-                        $addParams = isset($conf['params.'][$confData['type'] . '.']) ? trim($this->cObj->stdWrap($conf['params.'][$confData['type']], $conf['params.'][$confData['type'] . '.'])) : trim($conf['params.'][$confData['type']]);
-                    } else {
-                        $addParams = isset($conf['params.']) ? trim($this->cObj->stdWrap($conf['params'], $conf['params.'])) : trim($conf['params']);
-                    }
-                    if ((string)$addParams !== '') {
-                        $addParams = ' ' . $addParams;
-                    }
-                } else {
-                    $addParams = '';
-                }
-                $dontMd5FieldNames = isset($conf['dontMd5FieldNames.']) ? $this->cObj->stdWrap($conf['dontMd5FieldNames'], $conf['dontMd5FieldNames.']) : $conf['dontMd5FieldNames'];
-                if ($dontMd5FieldNames) {
-                    $fName = $confData['fieldname'];
-                } else {
-                    $fName = md5($confData['fieldname']);
-                }
-                // Accessibility: Set id = fieldname attribute:
-                $accessibility = isset($conf['accessibility.']) ? $this->cObj->stdWrap($conf['accessibility'], $conf['accessibility.']) : $conf['accessibility'];
-                if ($accessibility || $xhtmlStrict) {
-                    $elementIdAttribute = ' id="' . $prefix . $fName . '"';
-                } else {
-                    $elementIdAttribute = '';
-                }
-                // Create form field based on configuration/type:
-                switch ($confData['type']) {
-                    case 'textarea':
-                        $cols = trim($fParts[1]) ? (int)$fParts[1] : 20;
-                        $compensateFieldWidth = isset($conf['compensateFieldWidth.']) ? $this->cObj->stdWrap($conf['compensateFieldWidth'], $conf['compensateFieldWidth.']) : $conf['compensateFieldWidth'];
-                        $compWidth = doubleval($compensateFieldWidth ? $compensateFieldWidth : $GLOBALS['TSFE']->compensateFieldWidth);
-                        $compWidth = $compWidth ? $compWidth : 1;
-                        $cols = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($cols * $compWidth, 1, 120);
-                        $rows = trim($fParts[2]) ? \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($fParts[2], 1, 30) : 5;
-                        $wrap = trim($fParts[3]);
-                        $noWrapAttr = isset($conf['noWrapAttr.']) ? $this->cObj->stdWrap($conf['noWrapAttr'], $conf['noWrapAttr.']) : $conf['noWrapAttr'];
-                        if ($noWrapAttr || $wrap === 'disabled') {
-                            $wrap = '';
-                        } else {
-                            $wrap = $wrap ? ' wrap="' . $wrap . '"' : ' wrap="virtual"';
-                        }
-                        $noValueInsert = isset($conf['noValueInsert.']) ? $this->cObj->stdWrap($conf['noValueInsert'], $conf['noValueInsert.']) : $conf['noValueInsert'];
-                        $default = $this->getFieldDefaultValue($noValueInsert, $confData['fieldname'], str_replace('\\n', LF, trim($parts[2])));
-                        $fieldCode = sprintf('<textarea name="%s"%s cols="%s" rows="%s"%s%s>%s</textarea>', $confData['fieldname'], $elementIdAttribute, $cols, $rows, $wrap, $addParams, htmlspecialchars($default));
-                        break;
-                    case 'input':
-
-                    case 'password':
-                        $size = trim($fParts[1]) ? (int)$fParts[1] : 20;
-                        $compensateFieldWidth = isset($conf['compensateFieldWidth.']) ? $this->cObj->stdWrap($conf['compensateFieldWidth'], $conf['compensateFieldWidth.']) : $conf['compensateFieldWidth'];
-                        $compWidth = doubleval($compensateFieldWidth ? $compensateFieldWidth : $GLOBALS['TSFE']->compensateFieldWidth);
-                        $compWidth = $compWidth ? $compWidth : 1;
-                        $size = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($size * $compWidth, 1, 120);
-                        $noValueInsert = isset($conf['noValueInsert.']) ? $this->cObj->stdWrap($conf['noValueInsert'], $conf['noValueInsert.']) : $conf['noValueInsert'];
-                        $default = $this->getFieldDefaultValue($noValueInsert, $confData['fieldname'], trim($parts[2]));
-                        if ($confData['type'] == 'password') {
-                            $default = '';
-                        }
-                        $max = trim($fParts[2]) ? ' maxlength="' . \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($fParts[2], 1, 1000) . '"' : '';
-                        $theType = $confData['type'] == 'input' ? 'text' : 'password';
-                        $fieldCode = sprintf('<input type="%s" name="%s"%s size="%s"%s value="%s"%s />', $theType, $confData['fieldname'], $elementIdAttribute, $size, $max, htmlspecialchars($default), $addParams);
-                        break;
-                    case 'file':
-                        $size = trim($fParts[1]) ? \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($fParts[1], 1, 60) : 20;
-                        $fieldCode = sprintf('<input type="file" name="%s"%s size="%s"%s />', $confData['fieldname'], $elementIdAttribute, $size, $addParams);
-                        break;
-                    case 'check':
-                        // alternative default value:
-                        $noValueInsert = isset($conf['noValueInsert.']) ? $this->cObj->stdWrap($conf['noValueInsert'], $conf['noValueInsert.']) : $conf['noValueInsert'];
-                        $default = $this->getFieldDefaultValue($noValueInsert, $confData['fieldname'], trim($parts[2]));
-                        $checked = $default ? ' checked="checked"' : '';
-                        $fieldCode = sprintf('<input type="checkbox" value="%s" name="%s"%s%s%s />', 1, $confData['fieldname'], $elementIdAttribute, $checked, $addParams);
-                        break;
-                    case 'select':
-                        $option = '';
-                        $valueParts = explode(',', $parts[2]);
-                        // size
-                        if (strtolower(trim($fParts[1])) == 'auto') {
-                            $fParts[1] = count($valueParts);
-                        }
-                        // Auto size set here. Max 20
-                        $size = trim($fParts[1]) ? \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($fParts[1], 1, 20) : 1;
-                        // multiple
-                        $multiple = strtolower(trim($fParts[2])) == 'm' ? ' multiple="multiple"' : '';
-                        // Where the items will be
-                        $items = array();
-                        //RTF
-                        $defaults = array();
-                        $pCount = count($valueParts);
-                        for ($a = 0; $a < $pCount; $a++) {
-                            $valueParts[$a] = trim($valueParts[$a]);
-                            // Finding default value
-                            if ($valueParts[$a][0] === '*') {
-                                $sel = 'selected';
-                                $valueParts[$a] = substr($valueParts[$a], 1);
-                            } else {
-                                $sel = '';
-                            }
-                            // Get value/label
-                            $subParts = explode('=', $valueParts[$a]);
-                            // Sets the value
-                            $subParts[1] = isset($subParts[1]) ? trim($subParts[1]) : trim($subParts[0]);
-                            // Adds the value/label pair to the items-array
-                            $items[] = $subParts;
-                            if ($sel) {
-                                $defaults[] = $subParts[1];
-                            }
-                        }
-                        // alternative default value:
-                        $noValueInsert = isset($conf['noValueInsert.']) ? $this->cObj->stdWrap($conf['noValueInsert'], $conf['noValueInsert.']) : $conf['noValueInsert'];
-                        $default = $this->getFieldDefaultValue($noValueInsert, $confData['fieldname'], $defaults);
-                        if (!is_array($default)) {
-                            $defaults = array();
-                            $defaults[] = $default;
-                        } else {
-                            $defaults = $default;
-                        }
-                        // Create the select-box:
-                        $iCount = count($items);
-                        for ($a = 0; $a < $iCount; $a++) {
-                            $option .= '<option value="' . $items[$a][1] . '"' . (in_array($items[$a][1], $defaults) ? ' selected="selected"' : '') . '>' . trim($items[$a][0]) . '</option>';
-                        }
-                        if ($multiple) {
-                            // The fieldname must be prepended '[]' if multiple select. And the reason why it's prepended is, because the required-field list later must also have [] prepended.
-                            $confData['fieldname'] .= '[]';
-                        }
-                        $fieldCode = sprintf('<select name="%s"%s size="%s"%s%s>%s</select>', $confData['fieldname'], $elementIdAttribute, $size, $multiple, $addParams, $option);
-                        //RTF
-                        break;
-                    case 'radio':
-                        $option = '';
-                        $valueParts = explode(',', $parts[2]);
-                        // Where the items will be
-                        $items = array();
-                        $default = '';
-                        $pCount = count($valueParts);
-                        for ($a = 0; $a < $pCount; $a++) {
-                            $valueParts[$a] = trim($valueParts[$a]);
-                            if ($valueParts[$a][0] === '*') {
-                                $sel = 'checked';
-                                $valueParts[$a] = substr($valueParts[$a], 1);
-                            } else {
-                                $sel = '';
-                            }
-                            // Get value/label
-                            $subParts = explode('=', $valueParts[$a]);
-                            // Sets the value
-                            $subParts[1] = isset($subParts[1]) ? trim($subParts[1]) : trim($subParts[0]);
-                            // Adds the value/label pair to the items-array
-                            $items[] = $subParts;
-                            if ($sel) {
-                                $default = $subParts[1];
-                            }
-                        }
-                        // alternative default value:
-                        $noValueInsert = isset($conf['noValueInsert.']) ? $this->cObj->stdWrap($conf['noValueInsert'], $conf['noValueInsert.']) : $conf['noValueInsert'];
-                        $default = $this->getFieldDefaultValue($noValueInsert, $confData['fieldname'], $default);
-                        // Create the select-box:
-                        $iCount = count($items);
-                        for ($a = 0; $a < $iCount; $a++) {
-                            $optionParts = '';
-                            $radioId = $prefix . $fName . $this->cleanFormName($items[$a][0]);
-                            if ($accessibility) {
-                                $radioLabelIdAttribute = ' id="' . $radioId . '"';
-                            } else {
-                                $radioLabelIdAttribute = '';
-                            }
-                            $optionParts .= '<input type="radio" name="' . $confData['fieldname'] . '"' . $radioLabelIdAttribute . ' value="' . $items[$a][1] . '"' . ((string)$items[$a][1] === (string)$default ? ' checked="checked"' : '') . $addParams . ' />';
-                            if ($accessibility) {
-                                $label = isset($conf['radioWrap.']) ? $this->cObj->stdWrap(trim($items[$a][0]), $conf['radioWrap.']) : trim($items[$a][0]);
-                                $optionParts .= '<label for="' . $radioId . '">' . $label . '</label>';
-                            } else {
-                                $optionParts .= isset($conf['radioWrap.']) ? $this->cObj->stdWrap(trim($items[$a][0]), $conf['radioWrap.']) : trim($items[$a][0]);
-                            }
-                            $option .= isset($conf['radioInputWrap.']) ? $this->cObj->stdWrap($optionParts, $conf['radioInputWrap.']) : $optionParts;
-                        }
-                        if ($accessibility) {
-                            $accessibilityWrap = isset($conf['radioWrap.']['accessibilityWrap.']) ? $this->cObj->stdWrap($conf['radioWrap.']['accessibilityWrap'], $conf['radioWrap.']['accessibilityWrap.']) : $conf['radioWrap.']['accessibilityWrap'];
-                            if ($accessibilityWrap) {
-                                $search = array(
-                                    '###RADIO_FIELD_ID###',
-                                    '###RADIO_GROUP_LABEL###'
-                                );
-                                $replace = array(
-                                    $elementIdAttribute,
-                                    $confData['label']
-                                );
-                                $accessibilityWrap = str_replace($search, $replace, $accessibilityWrap);
-                                $option = $this->cObj->wrap($option, $accessibilityWrap);
-                            }
-                        }
-                        $fieldCode = $option;
-                        break;
-                    case 'hidden':
-                        $value = trim($parts[2]);
-                        // If this form includes an auto responder message, include a HMAC checksum field
-                        // in order to verify potential abuse of this feature.
-                        if ($value !== '') {
-                            if (GeneralUtility::inList($confData['fieldname'], 'auto_respond_msg')) {
-                                $hmacChecksum = GeneralUtility::hmac($value, 'content_form');
-                                $hiddenfields .= sprintf('<input type="hidden" name="auto_respond_checksum" id="%sauto_respond_checksum" value="%s" />', $prefix, $hmacChecksum);
-                            }
-                            if (GeneralUtility::inList('recipient_copy,recipient', $confData['fieldname']) && $GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) {
-                                break;
-                            }
-                            if (GeneralUtility::inList('recipient_copy,recipient', $confData['fieldname'])) {
-                                $value = \TYPO3\CMS\Compatibility6\Utility\FormUtility::codeString($value);
-                            }
-                        }
-                        $hiddenfields .= sprintf('<input type="hidden" name="%s"%s value="%s" />', $confData['fieldname'], $elementIdAttribute, htmlspecialchars($value));
-                        break;
-                    case 'property':
-                        if (GeneralUtility::inList('type,locationData,goodMess,badMess,emailMess', $confData['fieldname'])) {
-                            $value = trim($parts[2]);
-                            $propertyOverride[$confData['fieldname']] = $value;
-                            $conf[$confData['fieldname']] = $value;
-                        }
-                        break;
-                    case 'submit':
-                        $value = trim($parts[2]);
-                        if ($conf['image.']) {
-                            $this->cObj->data[$this->cObj->currentValKey] = $value;
-                            $image = $this->cObj->cObjGetSingle('IMG_RESOURCE', $conf['image.']);
-                            $params = $conf['image.']['params'] ? ' ' . $conf['image.']['params'] : '';
-                            $params .= $this->cObj->getAltParam($conf['image.'], false);
-                            $params .= $addParams;
-                        } else {
-                            $image = '';
-                        }
-                        if ($image) {
-                            $fieldCode = sprintf('<input type="image" name="%s"%s src="%s"%s />', $confData['fieldname'], $elementIdAttribute, $image, $params);
-                        } else {
-                            $fieldCode = sprintf('<input type="submit" name="%s"%s value="%s"%s />', $confData['fieldname'], $elementIdAttribute, htmlspecialchars($value, ENT_COMPAT, 'UTF-8', false), $addParams);
-                        }
-                        break;
-                    case 'reset':
-                        $value = trim($parts[2]);
-                        $fieldCode = sprintf('<input type="reset" name="%s"%s value="%s"%s />', $confData['fieldname'], $elementIdAttribute, htmlspecialchars($value, ENT_COMPAT, 'UTF-8', false), $addParams);
-                        break;
-                    case 'label':
-                        $fieldCode = nl2br(htmlspecialchars(trim($parts[2])));
-                        break;
-                    default:
-                        $confData['type'] = 'comment';
-                        $fieldCode = trim($parts[2]) . '&nbsp;';
-                }
-                if ($fieldCode) {
-                    // Checking for special evaluation modes:
-                    if (trim($parts[3]) !== '' && GeneralUtility::inList('textarea,input,password', $confData['type'])) {
-                        $modeParameters = GeneralUtility::trimExplode(':', $parts[3]);
-                    } else {
-                        $modeParameters = array();
-                    }
-                    // Adding evaluation based on settings:
-                    switch ((string)$modeParameters[0]) {
-                        case 'EREG':
-                            $fieldlist[] = '_EREG';
-                            $fieldlist[] = $modeParameters[1];
-                            $fieldlist[] = $modeParameters[2];
-                            $fieldlist[] = $confData['fieldname'];
-                            $fieldlist[] = $confData['label'];
-                            // Setting this so "required" layout is used.
-                            $confData['required'] = 1;
-                            break;
-                        case 'EMAIL':
-                            $fieldlist[] = '_EMAIL';
-                            $fieldlist[] = $confData['fieldname'];
-                            $fieldlist[] = $confData['label'];
-                            // Setting this so "required" layout is used.
-                            $confData['required'] = 1;
-                            break;
-                        default:
-                            if ($confData['required']) {
-                                $fieldlist[] = $confData['fieldname'];
-                                $fieldlist[] = $confData['label'];
-                            }
-                    }
-                    // Field:
-                    $fieldLabel = $confData['label'];
-                    if ($accessibility && trim($fieldLabel) && !preg_match('/^(label|hidden|comment)$/', $confData['type'])) {
-                        $fieldLabel = '<label for="' . $prefix . $fName . '">' . $fieldLabel . '</label>';
-                    }
-                    // Getting template code:
-                    if (isset($conf['fieldWrap.'])) {
-                        $fieldCode = $this->cObj->stdWrap($fieldCode, $conf['fieldWrap.']);
-                    }
-                    $labelCode = isset($conf['labelWrap.']) ? $this->cObj->stdWrap($fieldLabel, $conf['labelWrap.']) : $fieldLabel;
-                    $commentCode = isset($conf['commentWrap.']) ? $this->cObj->stdWrap($confData['label'], $conf['commentWrap.']) : $confData['label'];
-                    $result = $conf['layout'];
-                    $req = isset($conf['REQ.']) ? $this->cObj->stdWrap($conf['REQ'], $conf['REQ.']) : $conf['REQ'];
-                    if ($req && $confData['required']) {
-                        if (isset($conf['REQ.']['fieldWrap.'])) {
-                            $fieldCode = $this->cObj->stdWrap($fieldCode, $conf['REQ.']['fieldWrap.']);
-                        }
-                        if (isset($conf['REQ.']['labelWrap.'])) {
-                            $labelCode = $this->cObj->stdWrap($fieldLabel, $conf['REQ.']['labelWrap.']);
-                        }
-                        $reqLayout = isset($conf['REQ.']['layout.']) ? $this->cObj->stdWrap($conf['REQ.']['layout'], $conf['REQ.']['layout.']) : $conf['REQ.']['layout'];
-                        if ($reqLayout) {
-                            $result = $reqLayout;
-                        }
-                    }
-                    if ($confData['type'] == 'comment') {
-                        $commentLayout = isset($conf['COMMENT.']['layout.']) ? $this->cObj->stdWrap($conf['COMMENT.']['layout'], $conf['COMMENT.']['layout.']) : $conf['COMMENT.']['layout'];
-                        if ($commentLayout) {
-                            $result = $commentLayout;
-                        }
-                    }
-                    if ($confData['type'] == 'check') {
-                        $checkLayout = isset($conf['CHECK.']['layout.']) ? $this->cObj->stdWrap($conf['CHECK.']['layout'], $conf['CHECK.']['layout.']) : $conf['CHECK.']['layout'];
-                        if ($checkLayout) {
-                            $result = $checkLayout;
-                        }
-                    }
-                    if ($confData['type'] == 'radio') {
-                        $radioLayout = isset($conf['RADIO.']['layout.']) ? $this->cObj->stdWrap($conf['RADIO.']['layout'], $conf['RADIO.']['layout.']) : $conf['RADIO.']['layout'];
-                        if ($radioLayout) {
-                            $result = $radioLayout;
-                        }
-                    }
-                    if ($confData['type'] == 'label') {
-                        $labelLayout = isset($conf['LABEL.']['layout.']) ? $this->cObj->stdWrap($conf['LABEL.']['layout'], $conf['LABEL.']['layout.']) : $conf['LABEL.']['layout'];
-                        if ($labelLayout) {
-                            $result = $labelLayout;
-                        }
-                    }
-                    //RTF
-                    $content .= str_replace(
-                        array(
-                            '###FIELD###',
-                            '###LABEL###',
-                            '###COMMENT###'
-                        ),
-                        array(
-                            $fieldCode,
-                            $labelCode,
-                            $commentCode
-                        ),
-                        $result
-                    );
-                }
-            }
-        }
-        if (isset($conf['stdWrap.'])) {
-            $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
-        }
-        // Redirect (external: where to go afterwards. internal: where to submit to)
-        $theRedirect = isset($conf['redirect.']) ? $this->cObj->stdWrap($conf['redirect'], $conf['redirect.']) : $conf['redirect'];
-        // redirect should be set to the page to redirect to after an external script has been used. If internal scripts is used, and if no 'type' is set that dictates otherwise, redirect is used as the url to jump to as long as it's an integer (page)
-        $target = isset($conf['target.']) ? $this->cObj->stdWrap($conf['target'], $conf['target.']) : $conf['target'];
-        // redirect should be set to the page to redirect to after an external script has been used. If internal scripts is used, and if no 'type' is set that dictates otherwise, redirect is used as the url to jump to as long as it's an integer (page)
-        $noCache = isset($conf['no_cache.']) ? $this->cObj->stdWrap($conf['no_cache'], $conf['no_cache.']) : $conf['no_cache'];
-        // redirect should be set to the page to redirect to after an external script has been used. If internal scripts is used, and if no 'type' is set that dictates otherwise, redirect is used as the url to jump to as long as it's an integer (page)
-        $page = $GLOBALS['TSFE']->page;
-        // Internal: Just submit to current page
-        if (!$theRedirect) {
-            $LD = $GLOBALS['TSFE']->tmpl->linkData($page, $target, $noCache, 'index.php', '', $this->cObj->getClosestMPvalueForPage($page['uid']));
-        } elseif (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($theRedirect)) {
-            // Internal: Submit to page with ID $theRedirect
-            $page = $GLOBALS['TSFE']->sys_page->getPage_noCheck($theRedirect);
-            $LD = $GLOBALS['TSFE']->tmpl->linkData($page, $target, $noCache, 'index.php', '', $this->cObj->getClosestMPvalueForPage($page['uid']));
-        } else {
-            // External URL, redirect-hidden field is rendered!
-            $LD = $GLOBALS['TSFE']->tmpl->linkData($page, $target, $noCache, '', '', $this->cObj->getClosestMPvalueForPage($page['uid']));
-            $LD['totalURL'] = $theRedirect;
-            $hiddenfields .= '<input type="hidden" name="redirect" value="' . htmlspecialchars($LD['totalURL']) . '" />';
-        }
-        // Formtype (where to submit to!):
-        if ($propertyOverride['type']) {
-            $formtype = $propertyOverride['type'];
-        } else {
-            $formtype = isset($conf['type.']) ? $this->cObj->stdWrap($conf['type'], $conf['type.']) : $conf['type'];
-        }
-        // Submit to a specific page
-        if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($formtype)) {
-            $page = $GLOBALS['TSFE']->sys_page->getPage_noCheck($formtype);
-            $LD_A = $GLOBALS['TSFE']->tmpl->linkData($page, $target, $noCache, '', '', $this->cObj->getClosestMPvalueForPage($page['uid']));
-            $action = $LD_A['totalURL'];
-        } elseif ($formtype) {
-            // Submit to external script
-            $LD_A = $LD;
-            $action = $formtype;
-        } elseif (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($theRedirect)) {
-            $LD_A = $LD;
-            $action = $LD_A['totalURL'];
-        } else {
-            // Submit to "nothing" - which is current page
-            $LD_A = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page, $target, $noCache, '', '', $this->cObj->getClosestMPvalueForPage($page['uid']));
-            $action = $LD_A['totalURL'];
-        }
-        // Recipient:
-        $theEmail = isset($conf['recipient.']) ? $this->cObj->stdWrap($conf['recipient'], $conf['recipient.']) : $conf['recipient'];
-        if ($theEmail && !$GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) {
-            $theEmail = \TYPO3\CMS\Compatibility6\Utility\FormUtility::codeString($theEmail);
-            $hiddenfields .= '<input type="hidden" name="recipient" value="' . htmlspecialchars($theEmail) . '" />';
-        }
-        // location data:
-        $location = isset($conf['locationData.']) ? $this->cObj->stdWrap($conf['locationData'], $conf['locationData.']) : $conf['locationData'];
-        if ($location) {
-            if ($location == 'HTTP_POST_VARS' && isset($_POST['locationData'])) {
-                $locationData = GeneralUtility::_POST('locationData');
-            } else {
-                // locationData is [the page id]:[tablename]:[uid of record]. Indicates on which page the record (from tablename with uid) is shown. Used to check access.
-                if (isset($this->data['_LOCALIZED_UID'])) {
-                    $locationData = $GLOBALS['TSFE']->id . ':' . str_replace($this->data['uid'], $this->data['_LOCALIZED_UID'], $this->cObj->currentRecord);
-                } else {
-                    $locationData = $GLOBALS['TSFE']->id . ':' . $this->cObj->currentRecord;
-                }
-            }
-            $hiddenfields .= '<input type="hidden" name="locationData" value="' . htmlspecialchars($locationData) . '" />';
-        }
-        // Hidden fields:
-        if (is_array($conf['hiddenFields.'])) {
-            foreach ($conf['hiddenFields.'] as $hF_key => $hF_conf) {
-                if (substr($hF_key, -1) != '.') {
-                    $hF_value = $this->cObj->cObjGetSingle($hF_conf, $conf['hiddenFields.'][$hF_key . '.'], 'hiddenfields');
-                    if ((string)$hF_value !== '' && GeneralUtility::inList('recipient_copy,recipient', $hF_key)) {
-                        if ($GLOBALS['TYPO3_CONF_VARS']['FE']['secureFormmail']) {
-                            continue;
-                        }
-                        $hF_value = \TYPO3\CMS\Compatibility6\Utility\FormUtility::codeString($hF_value);
-                    }
-                    $hiddenfields .= '<input type="hidden" name="' . $hF_key . '" value="' . htmlspecialchars($hF_value) . '" />';
-                }
-            }
-        }
-        // Wrap all hidden fields in a div tag (see http://forge.typo3.org/issues/14491)
-        $hiddenfields = isset($conf['hiddenFields.']['stdWrap.']) ? $this->cObj->stdWrap($hiddenfields, $conf['hiddenFields.']['stdWrap.']) : '<div style="display:none;">' . $hiddenfields . '</div>';
-        if ($conf['REQ']) {
-            $goodMess = isset($conf['goodMess.']) ? $this->cObj->stdWrap($conf['goodMess'], $conf['goodMess.']) : $conf['goodMess'];
-            $badMess = isset($conf['badMess.']) ? $this->cObj->stdWrap($conf['badMess'], $conf['badMess.']) : $conf['badMess'];
-            $emailMess = isset($conf['emailMess.']) ? $this->cObj->stdWrap($conf['emailMess'], $conf['emailMess.']) : $conf['emailMess'];
-            $validateForm = ' onsubmit="return validateForm(' . GeneralUtility::quoteJSvalue($formName) . ',' . GeneralUtility::quoteJSvalue(implode(',', $fieldlist)) . ',' . GeneralUtility::quoteJSvalue($goodMess) . ',' . GeneralUtility::quoteJSvalue($badMess) . ',' . GeneralUtility::quoteJSvalue($emailMess) . ')"';
-            $GLOBALS['TSFE']->additionalHeaderData['JSFormValidate'] = '<script type="text/javascript" src="' . GeneralUtility::createVersionNumberedFilename(($GLOBALS['TSFE']->absRefPrefix . 'typo3/sysext/compatibility6/Resources/Public/JavaScript/jsfunc.validateform.js')) . '"></script>';
-        } else {
-            $validateForm = '';
-        }
-        // Create form tag:
-        $theTarget = $theRedirect ? $LD['target'] : $LD_A['target'];
-        $method = isset($conf['method.']) ? $this->cObj->stdWrap($conf['method'], $conf['method.']) : $conf['method'];
-        $content = array(
-            '<form' . ' action="' . htmlspecialchars($action) . '"' . ' id="' . $formName . '"' . ($xhtmlStrict ? '' : ' name="' . $formName . '"') . ' enctype="multipart/form-data"' . ' method="' . ($method ? $method : 'post') . '"' . ($theTarget ? ' target="' . $theTarget . '"' : '') . $validateForm . '>',
-            $hiddenfields . $content,
-            '</form>'
-        );
-        $arrayReturnMode = isset($conf['arrayReturnMode.']) ? $this->cObj->stdWrap($conf['arrayReturnMode'], $conf['arrayReturnMode.']) : $conf['arrayReturnMode'];
-        if ($arrayReturnMode) {
-            $content['validateForm'] = $validateForm;
-            $content['formname'] = $formName;
-            return $content;
-        } else {
-            return implode('', $content);
-        }
-    }
-
-
-    /**
-     * Returns a default value for a form field in the FORM cObject.
-     * Page CANNOT be cached because that would include the inserted value for the current user.
-     *
-     * @param bool $noValueInsert If noValueInsert OR if the no_cache flag for this page is NOT set, the original default value is returned.
-     * @param string $fieldName The POST var name to get default value for
-     * @param string $defaultVal The current default value
-     * @return string The default value, either from INPUT var or the current default, based on whether caching is enabled or not.
-     */
-    protected function getFieldDefaultValue($noValueInsert, $fieldName, $defaultVal)
-    {
-        if (!$GLOBALS['TSFE']->no_cache || !isset($_POST[$fieldName]) && !isset($_GET[$fieldName]) || $noValueInsert) {
-            return $defaultVal;
-        } else {
-            return GeneralUtility::_GP($fieldName);
-        }
-    }
-
-    /**
-     * Removes forbidden characters and spaces from name/id attributes in the form tag and formfields
-     *
-     * @param string $name Input string
-     * @return string the cleaned string
-     */
-    protected function cleanFormName($name)
-    {
-        // Turn data[x][y] into data:x:y:
-        $name = preg_replace('/\\[|\\]\\[?/', ':', trim($name));
-        // Remove illegal chars like _
-        return preg_replace('#[^:a-zA-Z0-9]#', '', $name);
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/ContentObject/HorizontalRulerContentObject.php b/typo3/sysext/compatibility6/Classes/ContentObject/HorizontalRulerContentObject.php
deleted file mode 100644 (file)
index 13e503b..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\ContentObject;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Contains HRULER content object.
- */
-class HorizontalRulerContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
-{
-    /**
-     * Rendering the cObject, HRULER
-     *
-     * @param array $conf Array of TypoScript properties
-     * @return string Output
-     */
-    public function render($conf = array())
-    {
-        $lineThickness = isset($conf['lineThickness.']) ? $this->cObj->stdWrap($conf['lineThickness'], $conf['lineThickness.']) : $conf['lineThickness'];
-        $lineThickness = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($lineThickness, 1, 50);
-        $lineColor = isset($conf['lineColor.']) ? $this->cObj->stdWrap($conf['lineColor'], $conf['lineColor.']) : $conf['lineColor'];
-        if (!$lineColor) {
-            $lineColor = 'black';
-        }
-        $spaceBefore = isset($conf['spaceLeft.']) ? (int)$this->cObj->stdWrap($conf['spaceLeft'], $conf['spaceLeft.']) : (int)$conf['spaceLeft'];
-        $spaceAfter = isset($conf['spaceRight.']) ? (int)$this->cObj->stdWrap($conf['spaceRight'], $conf['spaceRight.']) : (int)$conf['spaceRight'];
-        $tableWidth = isset($conf['tableWidth.']) ? (int)$this->cObj->stdWrap($conf['tableWidth'], $conf['tableWidth.']) : (int)$conf['tableWidth'];
-        if (!$tableWidth) {
-            $tableWidth = '99%';
-        }
-        $theValue = '';
-        $theValue .= '<table border="0" cellspacing="0" cellpadding="0"
-                       width="' . htmlspecialchars($tableWidth) . '"
-                       summary=""><tr>';
-        if ($spaceBefore) {
-            $theValue .= '<td width="1">
-                               <span style="width: ' . $spaceBefore . 'px; height: 1px;"></span>
-                       </td>';
-        }
-        $theValue .= '<td bgcolor="' . $lineColor . '">
-                       <span style="width: 1px; height: ' . $lineThickness . 'px;"></span>
-               </td>';
-        if ($spaceAfter) {
-            $theValue .= '<td width="1">
-                               <span style="width: ' . $spaceAfter . 'px; height: 1px;"></span>
-                       </td>';
-        }
-        $theValue .= '</tr></table>';
-        if (isset($conf['stdWrap.'])) {
-            $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
-        }
-        return $theValue;
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/ContentObject/ImageTextContentObject.php b/typo3/sysext/compatibility6/Classes/ContentObject/ImageTextContentObject.php
deleted file mode 100644 (file)
index 92bd1ff..0000000
+++ /dev/null
@@ -1,513 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\ContentObject;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Resource\ResourceFactory;
-
-/**
- * Contains IMGTEXT content object.
- */
-class ImageTextContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
-{
-    /**
-     * @var ResourceFactory
-     */
-    protected $fileFactory = null;
-
-    /**
-     * Rendering the cObject, IMGTEXT
-     * which is a text w/ image type that works with the image position through tables (pre-CSS styled content-time)
-     *
-     * @param array $conf Array of TypoScript properties
-     * @return string Output
-     */
-    public function render($conf = array())
-    {
-        $content = '';
-        if (isset($conf['text.'])) {
-            $text = $this->cObj->cObjGet($conf['text.'], 'text.');
-            // this gets the surrounding content
-            $content .= $this->cObj->stdWrap($text, $conf['text.']);
-        }
-        $imgList = isset($conf['imgList.']) ? trim($this->cObj->stdWrap($conf['imgList'], $conf['imgList.'])) : trim($conf['imgList']);
-        if ($imgList) {
-            $imgs = GeneralUtility::trimExplode(',', $imgList, true);
-            $imgStart = isset($conf['imgStart.']) ? (int)$this->cObj->stdWrap($conf['imgStart'], $conf['imgStart.']) : (int)$conf['imgStart'];
-            $imgCount = count($imgs) - $imgStart;
-            $imgMax = isset($conf['imgMax.']) ? (int)$this->cObj->stdWrap($conf['imgMax'], $conf['imgMax.']) : (int)$conf['imgMax'];
-            if ($imgMax) {
-                // Reduces the number of images.
-                $imgCount = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($imgCount, 0, $imgMax);
-            }
-            $imgPath = isset($conf['imgPath.']) ? $this->cObj->stdWrap($conf['imgPath'], $conf['imgPath.']) : $conf['imgPath'];
-            // initialisation
-            $caption = '';
-            $captionArray = array();
-            if (!$conf['captionSplit'] && !$conf['imageTextSplit'] && isset($conf['caption.'])) {
-                $caption = $this->cObj->cObjGet($conf['caption.'], 'caption.');
-                // Global caption, no splitting
-                $caption = $this->cObj->stdWrap($caption, $conf['caption.']);
-            }
-            if ($conf['captionSplit'] && $conf['captionSplit.']['cObject']) {
-                $legacyCaptionSplit = 1;
-                $capSplit = isset($conf['captionSplit.']['token.']) ? $this->cObj->stdWrap($conf['captionSplit.']['token'], $conf['captionSplit.']['token.']) : $conf['captionSplit.']['token'];
-                if (!$capSplit) {
-                    $capSplit = LF;
-                }
-                $captionArray = explode($capSplit, $this->cObj->cObjGetSingle($conf['captionSplit.']['cObject'], $conf['captionSplit.']['cObject.'], 'captionSplit.cObject'));
-                foreach ($captionArray as $ca_key => $ca_val) {
-                    $captionArray[$ca_key] = isset($conf['captionSplit.']['stdWrap.']) ? $this->cObj->stdWrap(trim($captionArray[$ca_key]), $conf['captionSplit.']['stdWrap.']) : trim($captionArray[$ca_key]);
-                }
-            }
-            $tablecode = '';
-            $position = isset($conf['textPos.']) ? $this->cObj->stdWrap($conf['textPos'], $conf['textPos.']) : $conf['textPos'];
-            $tmppos = $position & 7;
-            $contentPosition = $position & 24;
-            $align = $this->cObj->align[$tmppos];
-            $cap = $caption ? 1 : 0;
-            $txtMarg = isset($conf['textMargin.']) ? (int)$this->cObj->stdWrap($conf['textMargin'], $conf['textMargin.']) : (int)$conf['textMargin'];
-            if (!$conf['textMargin_outOfText'] && $contentPosition < 16) {
-                $txtMarg = 0;
-            }
-            $cols = isset($conf['cols.']) ? (int)$this->cObj->stdWrap($conf['cols'], $conf['cols.']) : (int)$conf['cols'];
-            $rows = isset($conf['rows.']) ? (int)$this->cObj->stdWrap($conf['rows'], $conf['rows.']) : (int)$conf['rows'];
-            $colspacing = isset($conf['colSpace.']) ? (int)$this->cObj->stdWrap($conf['colSpace'], $conf['colSpace.']) : (int)$conf['colSpace'];
-            $rowspacing = isset($conf['rowSpace.']) ? (int)$this->cObj->stdWrap($conf['rowSpace'], $conf['rowSpace.']) : (int)$conf['rowSpace'];
-            $border = isset($conf['border.']) ? (int)$this->cObj->stdWrap($conf['border'], $conf['border.']) : (int)$conf['border'];
-            $border = $border ? 1 : 0;
-            if ($border) {
-                $borderColor = isset($conf['borderCol.']) ? $this->cObj->stdWrap($conf['borderCol'], $conf['borderCol.']) : $conf['borderCol'];
-                if (!$borderColor) {
-                    $borderColor = 'black';
-                }
-                $borderThickness = isset($conf['borderThick.']) ? (int)$this->cObj->stdWrap($conf['borderThick'], $conf['borderThick.']) : (int)$conf['borderThick'];
-                if (!$borderThickness) {
-                    $borderThickness = 'black';
-                }
-            }
-            $caption_align = isset($conf['captionAlign.']) ? $this->cObj->stdWrap($conf['captionAlign'], $conf['captionAlign.']) : $conf['captionAlign'];
-            if (!$caption_align) {
-                $caption_align = $align;
-            }
-            // Generate cols
-            $colCount = $cols > 1 ? $cols : 1;
-            if ($colCount > $imgCount) {
-                $colCount = $imgCount;
-            }
-            $rowCount = $colCount > 1 ? ceil($imgCount / $colCount) : $imgCount;
-            // Generate rows
-            if ($rows > 1) {
-                $rowCount = $rows;
-                if ($rowCount > $imgCount) {
-                    $rowCount = $imgCount;
-                }
-                $colCount = $rowCount > 1 ? ceil($imgCount / $rowCount) : $imgCount;
-            }
-            // Max Width
-            $colRelations = isset($conf['colRelations.']) ? trim($this->cObj->stdWrap($conf['colRelations'], $conf['colRelations.'])) : trim($conf['colRelations']);
-            $maxW = isset($conf['maxW.']) ? (int)$this->cObj->stdWrap($conf['maxW'], $conf['maxW.']) : (int)$conf['maxW'];
-            $maxWInText = isset($conf['maxWInText.']) ? (int)$this->cObj->stdWrap($conf['maxWInText'], $conf['maxWInText.']) : (int)$conf['maxWInText'];
-            // If maxWInText is not set, it's calculated to the 50 % of the max...
-            if (!$maxWInText) {
-                $maxWInText = round($maxW / 2);
-            }
-            // inText
-            if ($maxWInText && $contentPosition >= 16) {
-                $maxW = $maxWInText;
-            }
-            // If there is a max width and if colCount is greater than  column
-            if ($maxW && $colCount > 0) {
-                $maxW = ceil(($maxW - $colspacing * ($colCount - 1) - $colCount * $border * $borderThickness * 2) / $colCount);
-            }
-            // Create the relation between rows
-            $colMaxW = array();
-            if ($colRelations) {
-                $rel_parts = explode(':', $colRelations);
-                $rel_total = 0;
-                for ($a = 0; $a < $colCount; $a++) {
-                    $rel_parts[$a] = (int)$rel_parts[$a];
-                    $rel_total += $rel_parts[$a];
-                }
-                if ($rel_total) {
-                    for ($a = 0; $a < $colCount; $a++) {
-                        $colMaxW[$a] = round($maxW * $colCount / $rel_total * $rel_parts[$a]);
-                    }
-                    // The difference in size between the largest and smalles must be within a factor of ten.
-                    if (min($colMaxW) <= 0 || max($rel_parts) / min($rel_parts) > 10) {
-                        $colMaxW = array();
-                    }
-                }
-            }
-            $image_compression = isset($conf['image_compression.']) ? (int)$this->cObj->stdWrap($conf['image_compression'], $conf['image_compression.']) : (int)$conf['image_compression'];
-            $image_effects = isset($conf['image_effects.']) ? (int)$this->cObj->stdWrap($conf['image_effects'], $conf['image_effects.']) : (int)$conf['image_effects'];
-            $image_frames = isset($conf['image_frames.']['key.']) ? (int)$this->cObj->stdWrap($conf['image_frames.']['key'], $conf['image_frames.']['key.']) : (int)$conf['image_frames.']['key'];
-            // Fetches pictures
-            $splitArr = array();
-            $splitArr['imgObjNum'] = $conf['imgObjNum'];
-            $splitArr = $GLOBALS['TSFE']->tmpl->splitConfArray($splitArr, $imgCount);
-            // EqualHeight
-            $equalHeight = isset($conf['equalH.']) ? (int)$this->cObj->stdWrap($conf['equalH'], $conf['equalH.']) : (int)$conf['equalH'];
-            // Initiate gifbuilder object in order to get dimensions AND calculate the imageWidth's
-            if ($equalHeight) {
-                $gifCreator = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Imaging\GifBuilder::class);
-                $gifCreator->init();
-                $relations = array();
-                $relations_cols = array();
-                $totalMaxW = $maxW * $colCount;
-                for ($a = 0; $a < $imgCount; $a++) {
-                    $imgKey = $a + $imgStart;
-                    $imgInfo = $gifCreator->getImageDimensions($imgPath . $imgs[$imgKey]);
-                    // relationship between the original height and the wished height
-                    $relations[$a] = $imgInfo[1] / $equalHeight;
-                    // if relations is zero, then the addition of this value is omitted as
-                    // the image is not expected to display because of some error.
-                    if ($relations[$a]) {
-                        // Counts the total width of the row with the new height taken into consideration.
-                        $relations_cols[floor($a / $colCount)] += $imgInfo[0] / $relations[$a];
-                    }
-                }
-            }
-            // Contains the width of every image row
-            $imageRowsFinalWidths = array();
-            $imageRowsMaxHeights = array();
-            $imgsTag = array();
-            $origImages = array();
-            for ($a = 0; $a < $imgCount; $a++) {
-                $GLOBALS['TSFE']->register['IMAGE_NUM'] = $a;
-                $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $a;
-                $imgKey = $a + $imgStart;
-                if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($imgs[$imgKey])) {
-                    $this->setCurrentFileInContentObjectRenderer(intval($imgs[$imgKey]));
-                }
-                $totalImagePath = $imgPath . $imgs[$imgKey];
-                $this->cObj->data[$this->cObj->currentValKey] = $totalImagePath;
-                $imgObjNum = (int)$splitArr[$a]['imgObjNum'];
-                $imgConf = $conf[$imgObjNum . '.'];
-                if ($equalHeight) {
-                    $scale = 1;
-                    if ($totalMaxW) {
-                        $rowTotalMaxW = $relations_cols[floor($a / $colCount)];
-                        if ($rowTotalMaxW > $totalMaxW) {
-                            $scale = $rowTotalMaxW / $totalMaxW;
-                        }
-                    }
-                    // Transfer info to the imageObject. Please note, that
-                    $imgConf['file.']['height'] = round($equalHeight / $scale);
-                    unset($imgConf['file.']['width'], $imgConf['file.']['maxW'], $imgConf['file.']['maxH'], $imgConf['file.']['minW'], $imgConf['file.']['minH'], $imgConf['file.']['width.'], $imgConf['file.']['maxW.'], $imgConf['file.']['maxH.'], $imgConf['file.']['minW.'], $imgConf['file.']['minH.']);
-                    // Setting this to zero, so that it doesn't disturb
-                    $maxW = 0;
-                }
-                if ($maxW) {
-                    if (!empty($colMaxW)) {
-                        $imgConf['file.']['maxW'] = $colMaxW[$a % $colCount];
-                    } else {
-                        $imgConf['file.']['maxW'] = $maxW;
-                    }
-                }
-                // Image Object supplied:
-                if (is_array($imgConf)) {
-                    if ($this->cObj->image_effects[$image_effects]) {
-                        $imgConf['file.']['params'] .= ' ' . $this->cObj->image_effects[$image_effects];
-                    }
-                    if ($image_frames) {
-                        if (is_array($conf['image_frames.'][$image_frames . '.'])) {
-                            $imgConf['file.']['m.'] = $conf['image_frames.'][$image_frames . '.'];
-                        }
-                    }
-                    if ($image_compression && $imgConf['file'] != 'GIFBUILDER') {
-                        if ($image_compression == 1) {
-                            $tempImport = $imgConf['file.']['import'];
-                            $tempImport_dot = $imgConf['file.']['import.'];
-                            unset($imgConf['file.']);
-                            $imgConf['file.']['import'] = $tempImport;
-                            $imgConf['file.']['import.'] = $tempImport_dot;
-                        } elseif (isset($this->cObj->image_compression[$image_compression])) {
-                            $imgConf['file.']['params'] .= ' ' . $this->cObj->image_compression[$image_compression]['params'];
-                            $imgConf['file.']['ext'] = $this->cObj->image_compression[$image_compression]['ext'];
-                            unset($imgConf['file.']['ext.']);
-                        }
-                    }
-                    // "alt", "title" and "longdesc" attributes:
-                    if ($imgConf['altText'] === '' && !is_array($imgConf['altText.'])) {
-                        $imgConf['altText'] = $conf['altText'];
-                        $imgConf['altText.'] = $conf['altText.'];
-                    }
-                    if ($imgConf['titleText'] === '' && !is_array($imgConf['titleText.'])) {
-                        $imgConf['titleText'] = $conf['titleText'];
-                        $imgConf['titleText.'] = $conf['titleText.'];
-                    }
-                    if ($imgConf['longdescURL'] === '' && !is_array($imgConf['longdescURL.'])) {
-                        $imgConf['longdescURL'] = $conf['longdescURL'];
-                        $imgConf['longdescURL.'] = $conf['longdescURL.'];
-                    }
-                } else {
-                    $imgConf = array(
-                        'altText' => $conf['altText'],
-                        'titleText' => $conf['titleText'],
-                        'longdescURL' => $conf['longdescURL'],
-                        'file' => $totalImagePath
-                    );
-                }
-                $imgsTag[$imgKey] = $this->cObj->cObjGetSingle('IMAGE', $imgConf);
-                // Store the original filepath
-                $origImages[$imgKey] = $GLOBALS['TSFE']->lastImageInfo;
-                $imageRowsFinalWidths[floor($a / $colCount)] += $GLOBALS['TSFE']->lastImageInfo[0];
-                if ($GLOBALS['TSFE']->lastImageInfo[1] > $imageRowsMaxHeights[floor($a / $colCount)]) {
-                    $imageRowsMaxHeights[floor($a / $colCount)] = $GLOBALS['TSFE']->lastImageInfo[1];
-                }
-            }
-            // Calculating the tableWidth:
-            // TableWidth problems: It creates problems if the pictures are NOT as wide as the tableWidth.
-            $tableWidth = max($imageRowsFinalWidths) + $colspacing * ($colCount - 1) + $colCount * $border * $borderThickness * 2;
-            // Make table for pictures
-            $index = ($imgIndex = $imgStart);
-            $noRows = isset($conf['noRows.']) ? $this->cObj->stdWrap($conf['noRows'], $conf['noRows.']) : $conf['noRows'];
-            $noCols = isset($conf['noCols.']) ? $this->cObj->stdWrap($conf['noCols'], $conf['noCols.']) : $conf['noCols'];
-            if ($noRows) {
-                $noCols = 0;
-            }
-            // noRows overrides noCols. They cannot exist at the same time.
-            if ($equalHeight) {
-                $noCols = 1;
-                $noRows = 0;
-            }
-            $rowCount_temp = 1;
-            $colCount_temp = $colCount;
-            if ($noRows) {
-                $rowCount_temp = $rowCount;
-                $rowCount = 1;
-            }
-            if ($noCols) {
-                $colCount = 1;
-            }
-            // col- and rowspans calculated
-            $colspan = $colspacing ? $colCount * 2 - 1 : $colCount;
-            $rowspan = ($rowspacing ? $rowCount * 2 - 1 : $rowCount) + $cap;
-            // Edit icons:
-            if (!is_array($conf['editIcons.'])) {
-                $conf['editIcons.'] = array();
-            }
-            $editIconsHTML = $conf['editIcons'] && $GLOBALS['TSFE']->beUserLogin ? $this->cObj->editIcons('', $conf['editIcons'], $conf['editIcons.']) : '';
-            // Strech out table:
-            $tablecode = '';
-            $flag = 0;
-            $noStretchAndMarginCells = isset($conf['noStretchAndMarginCells.']) ? $this->cObj->stdWrap($conf['noStretchAndMarginCells'], $conf['noStretchAndMarginCells.']) : $conf['noStretchAndMarginCells'];
-            if ($noStretchAndMarginCells != 1) {
-                $tablecode .= '<tr>';
-                if ($txtMarg && $align == 'right') {
-                    // If right aligned, the textborder is added on the right side
-                    $tablecode .= '<td rowspan="' . ($rowspan + 1) . '" valign="top"><span style="width: ' . $txtMarg . 'px; height: 1px;"></span>' . ($editIconsHTML ? '<br />' . $editIconsHTML : '') . '</td>';
-                    $editIconsHTML = '';
-                    $flag = 1;
-                }
-                $tablecode .= '<td colspan="' . $colspan . '"><span style="width: ' . $tableWidth . 'px; height: 1px;"></span></td>';
-                if ($txtMarg && $align == 'left') {
-                    // If left aligned, the textborder is added on the left side
-                    $tablecode .= '<td rowspan="' . ($rowspan + 1) . '" valign="top"><span style="width: ' . $txtMarg . 'px; height: 1px;"></span>' . ($editIconsHTML ? '<br />' . $editIconsHTML : '') . '</td>';
-                    $editIconsHTML = '';
-                    $flag = 1;
-                }
-                if ($flag) {
-                    $tableWidth += $txtMarg + 1;
-                }
-                $tablecode .= '</tr>';
-            }
-            // draw table
-            // Looping through rows. If 'noRows' is set, this is '1 time', but $rowCount_temp will hold the actual number of rows!
-            for ($c = 0; $c < $rowCount; $c++) {
-                // If this is NOT the first time in the loop AND if space is required, a row-spacer is added. In case of "noRows" rowspacing is done further down.
-                if ($c && $rowspacing) {
-                    $tablecode .= '<tr><td colspan="' . $colspan . '"><span style="width: 1px; height: ' . $rowspacing . 'px;"></span></td></tr>';
-                }
-                // starting row
-                $tablecode .= '<tr>';
-                // Looping through the columns
-                for ($b = 0; $b < $colCount_temp; $b++) {
-                    // If this is NOT the first iteration AND if column space is required. In case of "noCols", the space is done without a separate cell.
-                    if ($b && $colspacing) {
-                        if (!$noCols) {
-                            $tablecode .= '<td><span style="width: ' . $colspacing . 'px; height: 1px;"></span></td>';
-                        } else {
-                            $colSpacer = '<span style="width: ' . ($border ? $colspacing - 6 : $colspacing) . 'px; height: ' . ($imageRowsMaxHeights[$c] + ($border ? $borderThickness * 2 : 0)) . 'px;"></span>';
-                            $colSpacer = '<td valign="top">' . $colSpacer . '</td>';
-                            // added 160301, needed for the new "noCols"-table...
-                            $tablecode .= $colSpacer;
-                        }
-                    }
-                    if (!$noCols || $noCols && !$b) {
-                        // starting the cell. If "noCols" this cell will hold all images in the row, otherwise only a single image.
-                        $tablecode .= '<td valign="top">';
-                        if ($noCols) {
-                            $tablecode .= '<table width="' . $imageRowsFinalWidths[$c] . '" border="0" cellpadding="0" cellspacing="0"><tr>';
-                        }
-                    }
-                    // Looping through the rows IF "noRows" is set. "noRows"  means that the rows of images is not rendered
-                    // by physical table rows but images are all in one column and spaced apart with clear-gifs. This loop is
-                    // only one time if "noRows" is not set.
-                    for ($a = 0; $a < $rowCount_temp; $a++) {
-                        // register previous imgIndex
-                        $GLOBALS['TSFE']->register['IMAGE_NUM'] = $imgIndex;
-                        $imgIndex = $index + $a * $colCount_temp;
-                        $GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $imgIndex;
-                        if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($imgs[$imgIndex])) {
-                            $this->setCurrentFileInContentObjectRenderer(intval($imgs[$imgIndex]));
-                        }
-                        if ($imgsTag[$imgIndex]) {
-                            // Puts distance between the images IF "noRows" is set and this is the first iteration of the loop
-                            if ($rowspacing && $noRows && $a) {
-                                $tablecode .= '<span style="width: 1px; height: ' . $rowspacing . 'px;"></span><br />';
-                            }
-                            if ($legacyCaptionSplit) {
-                                $thisCaption = $captionArray[$imgIndex];
-                            } elseif (($conf['captionSplit'] || $conf['imageTextSplit']) && isset($conf['caption.'])) {
-                                $thisCaption = $this->cObj->cObjGet($conf['caption.'], 'caption.');
-                                $thisCaption = $this->cObj->stdWrap($thisCaption, $conf['caption.']);
-                            }
-                            $imageHTML = $imgsTag[$imgIndex] . '<br />';
-                            // this is necessary if the tablerows are supposed to space properly together! "noRows" is excluded because else the images "layer" together.
-                            $Talign = !trim($thisCaption) && !$noRows ? ' align="left"' : '';
-                            if ($border) {
-                                $imageHTML = '<table border="0" cellpadding="' . $borderThickness . '" cellspacing="0" bgcolor="' . $borderColor . '"' . $Talign . '><tr><td>' . $imageHTML . '</td></tr></table>';
-                            }
-                            $imageHTML .= $editIconsHTML;
-                            $editIconsHTML = '';
-                            // Adds caption.
-                            $imageHTML .= $thisCaption;
-                            if ($noCols) {
-                                $imageHTML = '<td valign="top">' . $imageHTML . '</td>';
-                            }
-                            // If noCols, put in table cell.
-                            $tablecode .= $imageHTML;
-                        }
-                    }
-                    $index++;
-                    if (!$noCols || $noCols && $b + 1 == $colCount_temp) {
-                        if ($noCols) {
-                            $tablecode .= '</tr></table>';
-                        }
-                        // In case of "noCols" we must finish the table that surrounds the images in the row.
-                        $tablecode .= '</td>';
-                    }
-                }
-                // ending row
-                $tablecode .= '</tr>';
-            }
-            if ($c) {
-                switch ($contentPosition) {
-                    case '0':
-
-                    case '8':
-                        // below
-                        switch ($align) {
-                            case 'center':
-                                $table_align = 'margin-left: auto; margin-right: auto';
-                                break;
-                            case 'right':
-                                $table_align = 'margin-left: auto; margin-right: 0px';
-                                break;
-                            default:
-                                // Most of all: left
-                                $table_align = 'margin-left: 0px; margin-right: auto';
-                        }
-                        $table_align = 'style="' . $table_align . '"';
-                        break;
-                    case '16':
-                        // in text
-                        $table_align = 'align="' . $align . '"';
-                        break;
-                    default:
-                        $table_align = '';
-                }
-                // Table-tag is inserted
-                $tablecode = '<table' . ($tableWidth ? ' width="' . $tableWidth . '"' : '') . ' border="0" cellspacing="0" cellpadding="0" ' . $table_align . ' class="imgtext-table">' . $tablecode;
-                // If this value is not long since reset.
-                if ($editIconsHTML) {
-                    $tablecode .= '<tr><td colspan="' . $colspan . '">' . $editIconsHTML . '</td></tr>';
-                    $editIconsHTML = '';
-                }
-                if ($cap) {
-                    $tablecode .= '<tr><td colspan="' . $colspan . '" align="' . $caption_align . '">' . $caption . '</td></tr>';
-                }
-                $tablecode .= '</table>';
-                if (isset($conf['tableStdWrap.'])) {
-                    $tablecode = $this->cObj->stdWrap($tablecode, $conf['tableStdWrap.']);
-                }
-            }
-            $spaceBelowAbove = isset($conf['spaceBelowAbove.']) ? (int)$this->cObj->stdWrap($conf['spaceBelowAbove'], $conf['spaceBelowAbove.']) : (int)$conf['spaceBelowAbove'];
-            switch ($contentPosition) {
-                case '0':
-                    // above
-                    $output = '<div style="text-align:' . $align . ';">' . $tablecode . '</div>' . $this->cObj->wrapSpace($content, ($spaceBelowAbove . '|0'));
-                    break;
-                case '8':
-                    // below
-                    $output = $this->cObj->wrapSpace($content, ('0|' . $spaceBelowAbove)) . '<div style="text-align:' . $align . ';">' . $tablecode . '</div>';
-                    break;
-                case '16':
-                    // in text
-                    $output = $tablecode . $content;
-                    break;
-                case '24':
-                    // in text, no wrap
-                    $theResult = '';
-                    $theResult .= '<table border="0" cellspacing="0" cellpadding="0" class="imgtext-nowrap"><tr>';
-                    if ($align == 'right') {
-                        $theResult .= '<td valign="top">' . $content . '</td><td valign="top">' . $tablecode . '</td>';
-                    } else {
-                        $theResult .= '<td valign="top">' . $tablecode . '</td><td valign="top">' . $content . '</td>';
-                    }
-                    $theResult .= '</tr></table>';
-                    $output = $theResult;
-                    break;
-            }
-        } else {
-            $output = $content;
-        }
-        if (isset($conf['stdWrap.'])) {
-            $output = $this->cObj->stdWrap($output, $conf['stdWrap.']);
-        }
-        return $output;
-    }
-
-    /**
-     * Loads the file reference object and sets it in the
-     * currentFile property of the ContentObjectRenderer.
-     *
-     * This makes the file data available during image rendering.
-     *
-     * @param int $fileUid The UID of the file reference that should be loaded.
-     * @return void
-     */
-    protected function setCurrentFileInContentObjectRenderer($fileUid)
-    {
-        $imageFile = $this->getFileFactory()->getFileReferenceObject($fileUid);
-        $this->cObj->setCurrentFile($imageFile);
-    }
-
-    /**
-     * Returns the file factory.
-     *
-     * @return ResourceFactory
-     */
-    protected function getFileFactory()
-    {
-        if ($this->fileFactory === null) {
-            $this->fileFactory = GeneralUtility::makeInstance(ResourceFactory::class);
-        }
-
-        return $this->fileFactory;
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/ContentObject/OffsetTableContentObject.php b/typo3/sysext/compatibility6/Classes/ContentObject/OffsetTableContentObject.php
deleted file mode 100644 (file)
index 22510ae..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\ContentObject;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Rendering of tables for offset
- */
-class OffsetTableContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
-{
-    /**
-     * @var string
-     */
-    public $tableParams = 'border="0" cellspacing="0" cellpadding="0"';
-
-    /**
-     * @var string
-     */
-    public $default_tableParams = 'border="0" cellspacing="0" cellpadding="0"';
-
-    /**
-     * @var string
-     */
-    public $tdParams = ' width="99%" valign="top"';
-
-    /**
-     * Override default constructor to make it possible to instantiate this
-     * class for rendering an offset table not in content object context
-     *
-     * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj
-     */
-    public function __construct(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj = null)
-    {
-        if (!is_null($cObj)) {
-            $this->cObj = $cObj;
-        }
-    }
-
-    /**
-     * Rendering the cObject, OTABLE
-     *
-     * @param array $conf Array of TypoScript properties
-     * @return string Output
-     */
-    public function render($conf = array())
-    {
-        $tableParams = isset($conf['tableParams.']) ? $this->cObj->stdWrap($conf['tableParams'], $conf['tableParams.']) : $conf['tableParams'];
-        if ($tableParams) {
-            $this->tableParams = $tableParams;
-        }
-        $offset = isset($conf['offset.']) ? $this->cObj->stdWrap($conf['offset'], $conf['offset.']) : $conf['offset'];
-        $content = $this->start($this->cObj->cObjGet($conf), $offset);
-        if (isset($conf['stdWrap.'])) {
-            $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
-        }
-        return $content;
-    }
-
-    /**
-     * Wrapping the input content string in a table which will space it out from top/left/right/bottom
-     *
-     * @param string $content The HTML content string
-     * @param string $offset List of offset parameters; x,y,r,b,w,h
-     * @return string The HTML content string being wrapped in a <table> offsetting the content as the $offset parameters defined
-     */
-    public function start($content, $offset)
-    {
-        $valPairs = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $offset . ',,,,,');
-        if ($valPairs[0] || $valPairs[1] || $valPairs[2] || $valPairs[3] || $valPairs[4] || $valPairs[5]) {
-            // If width is defined AND there has been no change to the default table params,
-            // then extend them to a tablewidth of 1
-            if ($valPairs[4] && $this->default_tableParams == $this->tableParams) {
-                $this->tableParams .= ' width="1"';
-            }
-            // Init:
-            $this->begin = LF . '<table ' . $this->tableParams . '>';
-            $this->end = '</table>';
-            $rows = array();
-            $widthImg = '';
-            $heightImg = '';
-            // If width is required, set so bottom column will display for sure
-            if ($valPairs[4]) {
-                if (!$valPairs[3]) {
-                    $valPairs[3] = 1;
-                }
-                $widthImg = '<span style="width: ' . $valPairs[4] . 'px; height: 1px;"></span>';
-            }
-            // If height is required, set so right column will display for sure
-            if ($valPairs[5]) {
-                if (!$valPairs[2]) {
-                    $valPairs[2] = 1;
-                }
-                $valPairs[2] = 1;
-                $heightImg = '<span style="width: 1px; height: ' . $valPairs[5] . 'px;"></span>';
-            }
-            // First row:
-            // top
-            if ($valPairs[1]) {
-                $rows[1] .= '<tr>';
-                $rows[1] .= '<td><span style="width: ' . ($valPairs[0] ?: 1) . 'px; height: ' . $valPairs[1] . 'px;"></span></td>';
-                if ($valPairs[0]) {
-                    $rows[1] .= '<td></td>';
-                }
-                if ($valPairs[2]) {
-                    $rows[1] .= '<td></td>';
-                }
-                $rows[1] .= '</tr>';
-            }
-            // Middle row:
-            $rows[2] .= '<tr>';
-            if ($valPairs[0]) {
-                $rows[2] .= $valPairs[1] ? '<td></td>' : '<td><span style="width: ' . $valPairs[0] . 'px; height: 1px;"></span></td>';
-            }
-            $rows[2] .= '<td' . $this->tdParams . '>' . $content . '</td>';
-            if ($valPairs[2]) {
-                $rows[2] .= $valPairs[3] ? '<td>' . $heightImg . '</td>' : '<td><span style="width: ' . $valPairs[2] . 'px; height: ' . ($valPairs[5] ?: 1) . 'px;"></span></td>';
-            }
-            $rows[2] .= '</tr>';
-            // Bottom row:
-            if ($valPairs[3]) {
-                $rows[3] .= '<tr>';
-                if ($valPairs[0]) {
-                    $rows[3] .= '<td></td>';
-                }
-                if ($valPairs[2]) {
-                    $rows[3] .= '<td>' . $widthImg . '</td>';
-                }
-                $rows[3] .= '<td><span style="width: ' . ($valPairs[2] ?: ($valPairs[4] ?: 1)) . 'px; height: ' . $valPairs[3] . 'px;"></span></td>';
-                $rows[3] .= '</tr>';
-            }
-            return $this->begin . implode('', $rows) . $this->end;
-        } else {
-            return $content;
-        }
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/ContentObject/SearchResultContentObject.php b/typo3/sysext/compatibility6/Classes/ContentObject/SearchResultContentObject.php
deleted file mode 100644 (file)
index 880a43f..0000000
+++ /dev/null
@@ -1,661 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\ContentObject;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
-
-/**
- * Search class used for the content object SEARCHRESULT
- * and searching in database tables, typ. "pages" and "tt_content"
- * Used to generate search queries for TypoScript.
- * The class is included from "TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer"
- * based on whether there has been detected content in the GPvar "sword"
- */
-class SearchResultContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
-{
-    /**
-     * @var array
-     */
-    public $tables = array();
-
-    /**
-     * Alternatively 'PRIMARY_KEY'; sorting by primary key
-     *
-     * @var string
-     */
-    public $group_by = 'PRIMARY_KEY';
-
-    /**
-     * Standard SQL-operator between words
-     *
-     * @var string
-     */
-    public $default_operator = 'AND';
-
-    /**
-     * @var bool
-     */
-    public $operator_translate_table_caseinsensitive = true;
-
-    /**
-     * case-sensitive. Defines the words, which will be operators between words
-     *
-     * @var array
-     */
-    public $operator_translate_table = array(
-        array('+', 'AND'),
-        array('|', 'AND'),
-        array('-', 'AND NOT'),
-        // english
-        array('and', 'AND'),
-        array('or', 'OR'),
-        array('not', 'AND NOT')
-    );
-
-    /**
-     * Contains the search-words and operators
-     *
-     * @var array
-     */
-    public $sword_array;
-
-    /**
-     * Contains the query parts after processing.
-     *
-     * @var array
-     */
-    public $queryParts;
-
-    /**
-     * This is set with the foreign table that 'pages' are connected to.
-     *
-     * @var string
-     */
-    public $fTable;
-
-    /**
-     * How many rows to offset from the beginning
-     *
-     * @var int
-     */
-    public $res_offset = 0;
-
-    /**
-     * How many results to show (0 = no limit)
-     *
-     * @var int
-     */
-    public $res_shows = 20;
-
-    /**
-     * Intern: How many results, there was last time (with the exact same searchstring.
-     *
-     * @var int
-     */
-    public $res_count;
-
-    /**
-     * List of pageIds.
-     *
-     * @var string
-     */
-    public $pageIdList = '';
-
-    /**
-     * @var string
-     */
-    public $listOfSearchFields = '';
-
-    /**
-     * Override default constructor to make it possible to instantiate this
-     * class for indexed_search
-     *
-     * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj
-     */
-    public function __construct(ContentObjectRenderer $cObj = null)
-    {
-        if (!is_null($cObj)) {
-            $this->cObj = $cObj;
-        }
-    }
-
-    /**
-     * Rendering the cObject, SEARCHRESULT
-     *
-     * @param array $conf Array of TypoScript properties
-     * @return string Output
-     */
-    public function render($conf = array())
-    {
-        if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('sword') && \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('scols')) {
-            $this->register_and_explode_search_string(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('sword'));
-            $this->register_tables_and_columns(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('scols'), $conf['allowedCols']);
-            // Depth
-            $depth = 100;
-            // The startId is found
-            $theStartId = 0;
-            if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('stype'))) {
-                $temp_theStartId = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('stype');
-                $rootLine = $GLOBALS['TSFE']->sys_page->getRootLine($temp_theStartId);
-                // The page MUST have a rootline with the Level0-page of the current site inside!!
-                foreach ($rootLine as $val) {
-                    if ($val['uid'] == $GLOBALS['TSFE']->tmpl->rootLine[0]['uid']) {
-                        $theStartId = $temp_theStartId;
-                    }
-                }
-            } elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('stype')) {
-                if (substr(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('stype'), 0, 1) == 'L') {
-                    $pointer = (int)substr(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('stype'), 1);
-                    $theRootLine = $GLOBALS['TSFE']->tmpl->rootLine;
-                    // location Data:
-                    $locDat_arr = explode(':', \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('locationData'));
-                    $pId = (int)$locDat_arr[0];
-                    if ($pId) {
-                        $altRootLine = $GLOBALS['TSFE']->sys_page->getRootLine($pId);
-                        ksort($altRootLine);
-                        if (!empty($altRootLine)) {
-                            // Check if the rootline has the real Level0 in it!!
-                            $hitRoot = 0;
-                            $theNewRoot = array();
-                            foreach ($altRootLine as $val) {
-                                if ($hitRoot || $val['uid'] == $GLOBALS['TSFE']->tmpl->rootLine[0]['uid']) {
-                                    $hitRoot = 1;
-                                    $theNewRoot[] = $val;
-                                }
-                            }
-                            if ($hitRoot) {
-                                // Override the real rootline if any thing
-                                $theRootLine = $theNewRoot;
-                            }
-                        }
-                    }
-                    $key = $this->cObj->getKey($pointer, $theRootLine);
-                    $theStartId = $theRootLine[$key]['uid'];
-                }
-            }
-            if (!$theStartId) {
-                // If not set, we use current page
-                $theStartId = $GLOBALS['TSFE']->id;
-            }
-            // Generate page-tree
-            $this->pageIdList .= $this->cObj->getTreeList(-1 * $theStartId, $depth);
-            $endClause = 'pages.uid IN (' . $this->pageIdList . ')
-                               AND pages.doktype in (' . $GLOBALS['TYPO3_CONF_VARS']['FE']['content_doktypes'] . ($conf['addExtUrlsAndShortCuts'] ? ',3,4' : '') . ')
-                               AND pages.no_search=0' . $this->cObj->enableFields($this->fTable) . $this->cObj->enableFields('pages');
-            if ($conf['languageField.'][$this->fTable]) {
-                // (using sys_language_uid which is the ACTUAL language of the page.
-                // sys_language_content is only for selecting DISPLAY content!)
-                $endClause .= ' AND ' . $this->fTable . '.' . $conf['languageField.'][$this->fTable] . ' = ' . (int)$GLOBALS['TSFE']->sys_language_uid;
-            }
-            // Build query
-            $this->build_search_query($endClause);
-            // Count...
-            if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('scount'))) {
-                $this->res_count = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('scount');
-            } else {
-                $this->count_query();
-            }
-            // Range
-            $spointer = (int)\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('spointer');
-            $range = isset($conf['range.']) ? $this->cObj->stdWrap($conf['range'], $conf['range.']) : $conf['range'];
-            if ($range) {
-                $theRange = (int)$range;
-            } else {
-                $theRange = 20;
-            }
-            // Order By:
-            $noOrderBy = isset($conf['noOrderBy.']) ? $this->cObj->stdWrap($conf['noOrderBy'], $conf['noOrderBy.']) : $conf['noOrderBy'];
-            if (!$noOrderBy) {
-                $this->queryParts['ORDERBY'] = 'pages.lastUpdated, pages.tstamp';
-            }
-            $this->queryParts['LIMIT'] = $spointer . ',' . $theRange;
-            // Search...
-            $this->execute_query();
-            if ($GLOBALS['TYPO3_DB']->sql_num_rows($this->result)) {
-                $GLOBALS['TSFE']->register['SWORD_PARAMS'] = $this->get_searchwords();
-                $total = $this->res_count;
-                $rangeLow = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($spointer + 1, 1, $total);
-                $rangeHigh = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($spointer + $theRange, 1, $total);
-                // prev/next url:
-                $target = isset($conf['target.']) ? $this->cObj->stdWrap($conf['target'], $conf['target.']) : $conf['target'];
-                $LD = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page, $target, 1, '', '', $this->cObj->getClosestMPvalueForPage($GLOBALS['TSFE']->page['uid']));
-                $targetPart = $LD['target'] ? ' target="' . htmlspecialchars($LD['target']) . '"' : '';
-                $urlParams = $this->cObj->URLqMark($LD['totalURL'], '&sword=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('sword')) . '&scols=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('scols')) . '&stype=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('stype')) . '&scount=' . $total);
-                // substitution:
-                $result = str_replace(
-                    array(
-                        '###RANGELOW###',
-                        '###RANGEHIGH###',
-                        '###TOTAL###'
-                    ),
-                    array(
-                        $rangeLow,
-                        $rangeHigh,
-                        $total
-                    ),
-                    $this->cObj->cObjGetSingle($conf['layout'], $conf['layout.'], 'layout')
-                );
-                if ($rangeHigh < $total) {
-                    $next = $this->cObj->cObjGetSingle($conf['next'], $conf['next.'], 'next');
-                    $next = '<a href="' . htmlspecialchars(($urlParams . '&spointer=' . ($spointer + $theRange))) . '"' . $targetPart . $GLOBALS['TSFE']->ATagParams . '>' . $next . '</a>';
-                } else {
-                    $next = '';
-                }
-                $result = str_replace('###NEXT###', $next, $result);
-                if ($rangeLow > 1) {
-                    $prev = $this->cObj->cObjGetSingle($conf['prev'], $conf['prev.'], 'prev');
-                    $prev = '<a href="' . htmlspecialchars(($urlParams . '&spointer=' . ($spointer - $theRange))) . '"' . $targetPart . $GLOBALS['TSFE']->ATagParams . '>' . $prev . '</a>';
-                } else {
-                    $prev = '';
-                }
-                $result = str_replace('###PREV###', $prev, $result);
-                // Searching result
-                $theValue = $this->cObj->cObjGetSingle($conf['resultObj'], $conf['resultObj.'], 'resultObj');
-                /** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj */
-                $cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
-                $cObj->setParent($this->cObj->data, $this->cObj->currentRecord);
-                $renderCode = '';
-                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($this->result)) {
-                    // versionOL() here? This is search result displays, is that possible to preview anyway?
-                    // Or are records selected here already future versions?
-                    $cObj->start($row);
-                    $renderCode .= $cObj->cObjGetSingle($conf['renderObj'], $conf['renderObj.'], 'renderObj');
-                }
-                $renderWrap = isset($conf['renderWrap.']) ? $this->cObj->stdWrap($conf['renderWrap'], $conf['renderWrap.']) : $conf['renderWrap'];
-                $theValue .= $this->cObj->wrap($renderCode, $renderWrap);
-                $theValue = str_replace('###RESULT###', $theValue, $result);
-            } else {
-                $theValue = $this->cObj->cObjGetSingle($conf['noResultObj'], $conf['noResultObj.'], 'noResultObj');
-            }
-            $GLOBALS['TT']->setTSlogMessage('Search in fields:   ' . $this->listOfSearchFields);
-            // Wrapping
-            $content = $theValue;
-            $wrap = isset($conf['wrap.']) ? $this->cObj->stdWrap($conf['wrap'], $conf['wrap.']) : $conf['wrap'];
-            if ($wrap) {
-                $content = $this->cObj->wrap($content, $wrap);
-            }
-            if (isset($conf['stdWrap.'])) {
-                $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
-            }
-            // Returning, do not cache the result of the search
-            $GLOBALS['TSFE']->set_no_cache('Search result page');
-            return $content;
-        }
-        return '';
-    }
-
-    /**
-     * Creates the $this->tables-array.
-     * The 'pages'-table is ALWAYS included as the search is page-based. Apart from this there may be one and only one table, joined with the pages-table. This table is the first table mentioned in the requested-list. If any more tables are set here, they are ignored.
-     *
-     * @param string $requestedCols is a list (-) of columns that we want to search. This could be input from the search-form (see TypoScript documentation)
-     * @param string $allowedCols $allowedCols: is the list of columns, that MAY be searched. All allowed cols are set as result-fields. All requested cols MUST be in the allowed-fields list.
-     * @return void
-     */
-    public function register_tables_and_columns($requestedCols, $allowedCols)
-    {
-        $rCols = $this->explodeCols($requestedCols);
-        $aCols = $this->explodeCols($allowedCols);
-        foreach ($rCols as $k => $v) {
-            $rCols[$k] = trim($v);
-            if (in_array($rCols[$k], $aCols)) {
-                $parts = explode('.', $rCols[$k]);
-                $this->tables[$parts[0]]['searchfields'][] = $parts[1];
-            }
-        }
-        $this->tables['pages']['primary_key'] = 'uid';
-        $this->tables['pages']['resultfields'][] = 'uid';
-        unset($this->tables['pages']['fkey']);
-        foreach ($aCols as $k => $v) {
-            $aCols[$k] = trim($v);
-            $parts = explode('.', $aCols[$k]);
-            $this->tables[$parts[0]]['resultfields'][] = $parts[1] . ' AS ' . str_replace('.', '_', $aCols[$k]);
-            $this->tables[$parts[0]]['fkey'] = 'pid';
-        }
-        $this->fTable = '';
-        foreach ($this->tables as $t => $v) {
-            if ($t != 'pages') {
-                if (!$this->fTable) {
-                    $this->fTable = $t;
-                } else {
-                    unset($this->tables[$t]);
-                }
-            }
-        }
-    }
-
-    /**
-     * Function that can convert the syntax for entering which tables/fields the search should be conducted in.
-     *
-     * @param string $in This is the code-line defining the tables/fields to search. Syntax: '[table1].[field1]-[field2]-[field3] : [table2].[field1]-[field2]'
-     * @return array An array where the values is "[table].[field]" strings to search
-     * @see register_tables_and_columns()
-     */
-    public function explodeCols($in)
-    {
-        $theArray = explode(':', $in);
-        $out = array();
-        foreach ($theArray as $val) {
-            $val = trim($val);
-            $parts = explode('.', $val);
-            if ($parts[0] && $parts[1]) {
-                $subparts = explode('-', $parts[1]);
-                foreach ($subparts as $piece) {
-                    $piece = trim($piece);
-                    if ($piece) {
-                        $out[] = $parts[0] . '.' . $piece;
-                    }
-                }
-            }
-        }
-        return $out;
-    }
-
-    /**
-     * Takes a search-string (WITHOUT SLASHES or else it'll be a little sppooky , NOW REMEMBER to unslash!!)
-     * Sets up $this->sword_array op with operators.
-     * This function uses $this->operator_translate_table as well as $this->default_operator
-     *
-     * @param string $sword The input search-word string.
-     * @return void
-     */
-    public function register_and_explode_search_string($sword)
-    {
-        $sword = trim($sword);
-        if ($sword) {
-            $components = $this->split($sword);
-            // the searchword is stored here during the loop
-            $s_sword = '';
-            if (is_array($components)) {
-                $i = 0;
-                $lastoper = '';
-                foreach ($components as $key => $val) {
-                    $operator = $this->get_operator($val);
-                    if ($operator) {
-                        $lastoper = $operator;
-                    } elseif (strlen($val) > 1) {
-                        // A searchword MUST be at least two characters long!
-                        $this->sword_array[$i]['sword'] = $val;
-                        $this->sword_array[$i]['oper'] = $lastoper ?: $this->default_operator;
-                        $lastoper = '';
-                        $i++;
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Used to split a search-word line up into elements to search for. This function will detect boolean words like AND and OR, + and -, and even find sentences encapsulated in ""
-     * This function could be re-written to be more clean and effective - yet it's not that important.
-     *
-     * @param string $origSword The raw sword string from outside
-     * @param string $specchars Special chars which are used as operators (+- is default)
-     * @param string $delchars Special chars which are deleted if the append the searchword (+-., is default)
-     * @return mixed Returns an ARRAY if there were search words, otherwise the return value may be unset.
-     */
-    public function split($origSword, $specchars = '+-', $delchars = '+.,-')
-    {
-        $sword = $origSword;
-        $specs = '[' . preg_quote($specchars, '/') . ']';
-        // As long as $sword is TRUE (that means $sword MUST be reduced little by little until its empty inside the loop!)
-        while ($sword) {
-            // There was a double-quote and we will then look for the ending quote.
-            if (preg_match('/^"/', $sword)) {
-                // Removes first double-quote
-                $sword = preg_replace('/^"/', '', $sword);
-                // Removes everything till next double-quote
-                preg_match('/^[^"]*/', $sword, $reg);
-                // reg[0] is the value, should not be trimmed
-                $value[] = $reg[0];
-                $sword = preg_replace('/^' . preg_quote($reg[0], '/') . '/', '', $sword);
-                // Removes last double-quote
-                $sword = trim(preg_replace('/^"/', '', $sword));
-            } elseif (preg_match('/^' . $specs . '/', $sword, $reg)) {
-                $value[] = $reg[0];
-                // Removes = sign
-                $sword = trim(preg_replace('/^' . $specs . '/', '', $sword));
-            } elseif (preg_match('/[\\+\\-]/', $sword)) {
-                // Check if $sword contains + or -
-                // + and - shall only be interpreted as $specchars when there's whitespace before it
-                // otherwise it's included in the searchword (e.g. "know-how")
-                // explode $sword to single words
-                $a_sword = explode(' ', $sword);
-                // get first word
-                $word = array_shift($a_sword);
-                // Delete $delchars at end of string
-                $word = rtrim($word, $delchars);
-                // add searchword to values
-                $value[] = $word;
-                // re-build $sword
-                $sword = implode(' ', $a_sword);
-            } else {
-                // There are no double-quotes around the value. Looking for next (space) or special char.
-                preg_match('/^[^ ' . preg_quote($specchars, '/') . ']*/', $sword, $reg);
-                // Delete $delchars at end of string
-                $word = rtrim(trim($reg[0]), $delchars);
-                $value[] = $word;
-                $sword = trim(preg_replace('/^' . preg_quote($reg[0], '/') . '/', '', $sword));
-            }
-        }
-        return $value;
-    }
-
-    /**
-     * This creates the search-query.
-     * In TypoScript this is used for searching only records not hidden, start/endtimed and fe_grouped! (enable-fields, see tt_content)
-     * Sets $this->queryParts
-     *
-     * @param string $endClause Some extra conditions that the search must match.
-     * @return bool Returns TRUE no matter what - sweet isn't it!
-     * @access private
-     * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::SEARCHRESULT()
-     */
-    public function build_search_query($endClause)
-    {
-        if (is_array($this->tables)) {
-            $tables = $this->tables;
-            $primary_table = '';
-            // Primary key table is found.
-            foreach ($tables as $key => $val) {
-                if ($tables[$key]['primary_key']) {
-                    $primary_table = $key;
-                }
-            }
-            if ($primary_table) {
-                // Initialize query parts:
-                $this->queryParts = array(
-                    'SELECT' => '',
-                    'FROM' => '',
-                    'WHERE' => '',
-                    'GROUPBY' => '',
-                    'ORDERBY' => '',
-                    'LIMIT' => ''
-                );
-                // Find tables / field names to select:
-                $fieldArray = array();
-                $tableArray = array();
-                foreach ($tables as $key => $val) {
-                    $tableArray[] = $key;
-                    $resultfields = $tables[$key]['resultfields'];
-                    if (is_array($resultfields)) {
-                        foreach ($resultfields as $key2 => $val2) {
-                            $fieldArray[] = $key . '.' . $val2;
-                        }
-                    }
-                }
-                $this->queryParts['SELECT'] = implode(',', $fieldArray);
-                $this->queryParts['FROM'] = implode(',', $tableArray);
-                // Set join WHERE parts:
-                $whereArray = array();
-                $primary_table_and_key = $primary_table . '.' . $tables[$primary_table]['primary_key'];
-                $primKeys = array();
-                foreach ($tables as $key => $val) {
-                    $fkey = $tables[$key]['fkey'];
-                    if ($fkey) {
-                        $primKeys[] = $key . '.' . $fkey . '=' . $primary_table_and_key;
-                    }
-                }
-                if (!empty($primKeys)) {
-                    $whereArray[] = '(' . implode(' OR ', $primKeys) . ')';
-                }
-                // Additional where clause:
-                if (trim($endClause)) {
-                    $whereArray[] = trim($endClause);
-                }
-                // Add search word where clause:
-                $query_part = $this->build_search_query_for_searchwords();
-                if (!$query_part) {
-                    $query_part = '(0!=0)';
-                }
-                $whereArray[] = '(' . $query_part . ')';
-                // Implode where clauses:
-                $this->queryParts['WHERE'] = implode(' AND ', $whereArray);
-                // Group by settings:
-                if ($this->group_by) {
-                    if ($this->group_by == 'PRIMARY_KEY') {
-                        $this->queryParts['GROUPBY'] = $primary_table_and_key;
-                    } else {
-                        $this->queryParts['GROUPBY'] = $this->group_by;
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Creates the part of the SQL-sentence, that searches for the search-words ($this->sword_array)
-     *
-     * @return string Part of where class limiting result to the those having the search word.
-     * @access private
-     */
-    public function build_search_query_for_searchwords()
-    {
-        if (is_array($this->sword_array)) {
-            $main_query_part = array();
-            foreach ($this->sword_array as $key => $val) {
-                $s_sword = $this->sword_array[$key]['sword'];
-                // Get subQueryPart
-                $sub_query_part = array();
-                $this->listOfSearchFields = '';
-                foreach ($this->tables as $key3 => $val3) {
-                    $searchfields = $this->tables[$key3]['searchfields'];
-                    if (is_array($searchfields)) {
-                        foreach ($searchfields as $key2 => $val2) {
-                            $this->listOfSearchFields .= $key3 . '.' . $val2 . ',';
-                            $sub_query_part[] = $key3 . '.' . $val2 . ' LIKE \'%' . $GLOBALS['TYPO3_DB']->quoteStr($s_sword, $key3) . '%\'';
-                        }
-                    }
-                }
-                if (!empty($sub_query_part)) {
-                    $main_query_part[] = $this->sword_array[$key]['oper'];
-                    $main_query_part[] = '(' . implode(' OR ', $sub_query_part) . ')';
-                }
-            }
-            if (!empty($main_query_part)) {
-                // Remove first part anyways.
-                unset($main_query_part[0]);
-                return implode(' ', $main_query_part);
-            }
-        }
-    }
-
-    /**
-     * This returns an SQL search-operator (eg. AND, OR, NOT) translated from the current localized set of operators (eg. in danish OG, ELLER, IKKE).
-     *
-     * @param string $operator The possible operator to find in the internal operator array.
-     * @return string If found, the SQL operator for the localized input operator.
-     * @access private
-     */
-    public function get_operator($operator)
-    {
-        $operator = trim($operator);
-        $op_array = $this->operator_translate_table;
-        if ($this->operator_translate_table_caseinsensitive) {
-            // case-conversion is charset insensitive, but it doesn't spoil
-            // anything if input string AND operator table is already converted
-            $operator = strtolower($operator);
-        }
-        foreach ($op_array as $key => $val) {
-            $item = $op_array[$key][0];
-            if ($this->operator_translate_table_caseinsensitive) {
-                // See note above.
-                $item = strtolower($item);
-            }
-            if ($operator == $item) {
-                return $op_array[$key][1];
-            }
-        }
-    }
-
-    /**
-     * Counts the results and sets the result in $this->res_count
-     *
-     * @return bool TRUE, if $this->query was found
-     */
-    public function count_query()
-    {
-        if (is_array($this->queryParts)) {
-            $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($this->queryParts['SELECT'], $this->queryParts['FROM'], $this->queryParts['WHERE'], $this->queryParts['GROUPBY']);
-            $this->res_count = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
-            return true;
-        }
-    }
-
-    /**
-     * Executes the search, sets result pointer in $this->result
-     *
-     * @return bool TRUE, if $this->query was set and query performed
-     */
-    public function execute_query()
-    {
-        if (is_array($this->queryParts)) {
-            $this->result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($this->queryParts);
-            return true;
-        }
-    }
-
-    /**
-     * Returns URL-parameters with the current search words.
-     * Used when linking to result pages so that search words can be highlighted.
-     *
-     * @return string URL-parameters with the searchwords
-     */
-    public function get_searchwords()
-    {
-        $SWORD_PARAMS = '';
-        if (is_array($this->sword_array)) {
-            foreach ($this->sword_array as $key => $val) {
-                $SWORD_PARAMS .= '&sword_list[]=' . rawurlencode($val['sword']);
-            }
-        }
-        return $SWORD_PARAMS;
-    }
-
-    /**
-     * Returns an array with the search words in
-     *
-     * @return array IF the internal sword_array contained search words it will return these, otherwise "void
-     */
-    public function get_searchwordsArray()
-    {
-        if (is_array($this->sword_array)) {
-            foreach ($this->sword_array as $key => $val) {
-                $swords[] = $val['sword'];
-            }
-        }
-        return $swords;
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/ContentObject/TableRenderer.php b/typo3/sysext/compatibility6/Classes/ContentObject/TableRenderer.php
deleted file mode 100644 (file)
index c018fe5..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\ContentObject;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Rendering of tables for content positioning
- *
- * @see ContentObjectRenderer::CTABLE()
- */
-class TableRenderer
-{
-    /**
-     * offset, x
-     *
-     * @var int
-     */
-    public $offX = 0;
-
-    /**
-     * offset, y
-     *
-     * @var int
-     */
-    public $offY = 0;
-
-    /**
-     * top menu
-     *
-     * @var string
-     */
-    public $tm = '';
-
-    /**
-     * left menu
-     *
-     * @var string
-     */
-    public $lm = '';
-
-    /**
-     * right menu
-     *
-     * @var string
-     */
-    public $rm = '';
-
-    /**
-     * bottom menu
-     *
-     * @var string
-     */
-    public $bm = '';
-
-    /**
-     * content
-     *
-     * @var string
-     */
-    public $content = '';
-
-    /**
-     * top menu TDparams
-     *
-     * @var string
-     */
-    public $tmTDparams = 'valign="top"';
-
-    /**
-     * left menu TDparams
-     *
-     * @var string
-     */
-    public $lmTDparams = 'valign="top"';
-
-    /**
-     * right menu TDparams
-     *
-     * @var string
-     */
-    public $rmTDparams = 'valign="top"';
-
-    /**
-     * bottom menu TDparams
-     *
-     * @var string
-     */
-    public $bmTDparams = 'valign="top"';
-
-    /**
-     * content TDparams
-     *
-     * @var string
-     */
-    public $contentTDparams = 'valign="top"';
-
-    /**
-     * content margin, left
-     *
-     * @var int
-     */
-    public $cMl = 1;
-
-    /**
-     * content margin, right
-     *
-     * @var int
-     */
-    public $cMr = 1;
-
-    /**
-     * content margin, top
-     *
-     * @var int
-     */
-    public $cMt = 0;
-
-    /**
-     * content margin, bottom
-     *
-     * @var int
-     */
-    public $cMb = 1;
-
-    /**
-     * Places a little gif-spacer in the bottom of the content frame
-     *
-     * @var int
-     */
-    public $contentW = 0;
-
-    /**
-     * @var string
-     */
-    public $tableParams = 'border="0" cellspacing="0" cellpadding="0"';
-
-    /**
-     * Wrapping internal vars ->tm, ->lm, ->rm, ->bm and ->content in a table where each content part is stored in a cell.
-     * The two arguments to this function defines some offsets and margins to use in the arrangement of the content in the table.
-     *
-     * @param string $offset List of offset parameters; x,y
-     * @param string $cMargins List of margin parameters; left, top, right, bottom
-     * @return string The content strings wrapped in a <table> as the parameters defined
-     * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::CTABLE()
-     */
-    public function start($offset, $cMargins)
-    {
-        $offArr = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $offset);
-        $cMargArr = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $cMargins);
-        $cols = 0;
-        $rows = 0;
-        if ($this->lm) {
-            $cols++;
-        }
-        if ($this->rm) {
-            $cols++;
-        }
-        if ($cMargArr[0]) {
-            $cols++;
-        }
-        if ($cMargArr[2]) {
-            $cols++;
-        }
-        if ($cMargArr[1] || $cMargArr[3] || $this->tm || $this->bm || $this->content || $this->contentW) {
-            $cols++;
-        }
-        if ($cMargArr[1]) {
-            $rows++;
-        }
-        if ($cMargArr[3]) {
-            $rows++;
-        }
-        if ($this->tm) {
-            $rows++;
-        }
-        if ($this->bm) {
-            $rows++;
-        }
-        if ($this->content) {
-            $rows++;
-        }
-        if ($this->contentW) {
-            $rows++;
-        }
-        if (!$rows && $cols) {
-            // If there are no rows in the middle but still som columns...
-            $rows = 1;
-        }
-        if ($rows && $cols) {
-            $res = LF . '<table ' . $this->tableParams . '>';
-            // Top offset:
-            if ($offArr[1]) {
-                $xoff = $offArr[0] ? 1 : 0;
-                if ($cols + $xoff > 1) {
-                    $colspan = ' colspan="' . ($cols + $xoff) . '"';
-                }
-                $res .= '<tr><td' . $colspan . '><span style="width: 1px; height: ' . $offArr[1] . 'px;"></span></td></tr>';
-            }
-            // The rows:
-            if ($rows > 1) {
-                $rowspan = ' rowspan="' . $rows . '"';
-            }
-            $res .= '<tr>';
-            if ($offArr[0]) {
-                $res .= '<td' . $rowspan . '><span style="width: ' . $offArr[0] . 'px; height: 1px;"></span></td>';
-            }
-            if ($this->lm) {
-                $res .= '<td' . $rowspan . ' ' . $this->lmTDparams . '>' . $this->lm . '</td>';
-            }
-            if ($cMargArr[0]) {
-                $res .= '<td' . $rowspan . '><span style="width: ' . $cMargArr[0] . 'px; height: 1px;"></span></td>';
-            }
-            // Content...
-            $middle = array();
-            if ($this->tm) {
-                $middle[] = '<td ' . $this->tmTDparams . '>' . $this->tm . '</td>';
-            }
-            if ($cMargArr[1]) {
-                $middle[] = '<td><span style="width: 1px; height: ' . $cMargArr[1] . 'px;"></span></td>';
-            }
-            if ($this->content) {
-                $middle[] = '<td ' . $this->contentTDparams . '>' . $this->content . '</td>';
-            }
-            if ($cMargArr[3]) {
-                $middle[] = '<td><span style="width: 1px; height: ' . $cMargArr[3] . 'px;"></span></td>';
-            }
-            if ($this->bm) {
-                $middle[] = '<td ' . $this->bmTDparams . '>' . $this->bm . '</td>';
-            }
-            if ($this->contentW) {
-                $middle[] = '<td><span style="width: ' . $this->contentW . 'px; height: 1px;"></span></td>';
-            }
-            if (isset($middle[0])) {
-                $res .= $middle[0];
-            }
-            // Left of content
-            if ($cMargArr[2]) {
-                $res .= '<td' . $rowspan . '><span style="width: ' . $cMargArr[2] . 'px; height: 1px;"></span></td>';
-            }
-            if ($this->rm) {
-                $res .= '<td' . $rowspan . ' ' . $this->rmTDparams . '>' . $this->rm . '</td>';
-            }
-            $res .= '</tr>';
-            // More than the two rows
-            $mCount = count($middle);
-            for ($a = 1; $a < $mCount; $a++) {
-                $res .= '<tr>' . $middle[$a] . '</tr>';
-            }
-            $res .= '</table>';
-            return $res;
-        }
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Controller/FormDataSubmissionController.php b/typo3/sysext/compatibility6/Classes/Controller/FormDataSubmissionController.php
deleted file mode 100644 (file)
index bc30064..0000000
+++ /dev/null
@@ -1,457 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Controller;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\MailUtility;
-use TYPO3\CMS\Core\Utility\MathUtility;
-
-/**
- * Formmail class
- * used to submit data, and hooks into TSFE
- */
-class FormDataSubmissionController
-{
-    /**
-     * @var string
-     */
-    protected $reserved_names = 'recipient,recipient_copy,auto_respond_msg,auto_respond_checksum,redirect,subject,attachment,from_email,from_name,replyto_email,replyto_name,organisation,priority,html_enabled,quoted_printable,submit_x,submit_y';
-
-    /**
-     * Collection of suspicious header data, used for logging
-     *
-     * @var array
-     */
-    protected $dirtyHeaders = array();
-
-    /**
-     * @var string
-     */
-    protected $characterSet;
-
-    /**
-     * @var string
-     */
-    protected $subject;
-
-    /**
-     * @var string
-     */
-    protected $fromName;
-
-    /**
-     * @var string
-     */
-    protected $replyToName;
-
-    /**
-     * @var string
-     */
-    protected $organisation;
-
-    /**
-     * @var string
-     */
-    protected $fromAddress;
-
-    /**
-     * @var string
-     */
-    protected $replyToAddress;
-
-    /**
-     * @var int
-     */
-    protected $priority;
-
-    /**
-     * @var string
-     */
-    protected $autoRespondMessage;
-
-    /**
-     * @var string
-     */
-    protected $encoding = 'quoted-printable';
-
-    /**
-     * @var \TYPO3\CMS\Core\Mail\MailMessage
-     */
-    protected $mailMessage;
-
-    /**
-     * @var string
-     */
-    protected $recipient;
-
-    /**
-     * @var string
-     */
-    protected $plainContent = '';
-
-    /**
-     * @var array Files to clean up at the end (attachments)
-     */
-    protected $temporaryFiles = array();
-
-    /**
-     * @var \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
-     */
-    protected $frontendController = null;
-
-    /**
-     * hook to be executed by TypoScriptFrontendController
-     *
-     * @param \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $frontendController
-     */
-    public function checkDataSubmission($frontendController)
-    {
-        $this->frontendController = $frontendController;
-
-        // Checks if any email-submissions
-        $formtype_mail = isset($_POST['formtype_mail']) || isset($_POST['formtype_mail_x']);
-        if ($formtype_mail) {
-            $refInfo = parse_url(GeneralUtility::getIndpEnv('HTTP_REFERER'));
-            if (GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY') == $refInfo['host'] || $this->frontendController->TYPO3_CONF_VARS['SYS']['doNotCheckReferer']) {
-                if ($this->locDataCheck($_POST['locationData'])) {
-                    if ($formtype_mail) {
-                        $this->prepareAndSend();
-                        $GLOBALS['TT']->setTSlogMessage('"Check Data Submission": Return value: email', 0);
-                    }
-                }
-            } else {
-                $GLOBALS['TT']->setTSlogMessage('"Check Data Submission": HTTP_HOST and REFERER HOST did not match when processing submitted formdata!', 3);
-            }
-        }
-    }
-
-    /**
-     * Checks if a formmail submission can be sent as email
-     *
-     * @param string $locationData The input from $_POST['locationData']
-     * @return void|int
-     */
-    protected function locDataCheck($locationData)
-    {
-        $locData = explode(':', $locationData);
-        if (!$locData[1] || $this->frontendController->sys_page->checkRecord($locData[1], $locData[2], 1)) {
-            // $locData[1] -check means that a record is checked only if the locationData has a value for a record else than the page.
-            if (!empty($this->frontendController->sys_page->getPage($locData[0]))) {
-                return 1;
-            }
-            $GLOBALS['TT']->setTSlogMessage('LocationData Error: The page pointed to by location data (' . $locationData . ') was not accessible.', 2);
-        } else {
-            $GLOBALS['TT']->setTSlogMessage('LocationData Error: Location data (' . $locationData . ') record pointed to was not accessible.', 2);
-        }
-    }
-
-    /**
-     * Sends the emails from the formmail content object.
-     *
-     * @return void
-     */
-    protected function prepareAndSend()
-    {
-        $EMAIL_VARS = GeneralUtility::_POST();
-        $locationData = $EMAIL_VARS['locationData'];
-        unset($EMAIL_VARS['locationData']);
-        unset($EMAIL_VARS['formtype_mail'], $EMAIL_VARS['formtype_mail_x'], $EMAIL_VARS['formtype_mail_y']);
-        $integrityCheck = $this->frontendController->TYPO3_CONF_VARS['FE']['strictFormmail'];
-        if (!$this->frontendController->TYPO3_CONF_VARS['FE']['secureFormmail']) {
-            // Check recipient field:
-            // These two fields are the ones which contain recipient addresses that can be misused to send mail from foreign servers.
-            $encodedFields = explode(',', 'recipient, recipient_copy');
-            foreach ($encodedFields as $fieldKey) {
-                if ((string)$EMAIL_VARS[$fieldKey] !== '') {
-                    // Decode...
-                    if ($res = \TYPO3\CMS\Compatibility6\Utility\FormUtility::codeString($EMAIL_VARS[$fieldKey], true)) {
-                        $EMAIL_VARS[$fieldKey] = $res;
-                    } elseif ($integrityCheck) {
-                        // Otherwise abort:
-                        $GLOBALS['TT']->setTSlogMessage('"Formmail" discovered a field (' . $fieldKey . ') which could not be decoded to a valid string. Sending formmail aborted due to security reasons!', 3);
-                        return;
-                    } else {
-                        $GLOBALS['TT']->setTSlogMessage('"Formmail" discovered a field (' . $fieldKey . ') which could not be decoded to a valid string. The security level accepts this, but you should consider a correct coding though!', 2);
-                    }
-                }
-            }
-        } else {
-            $locData = explode(':', $locationData);
-            $record = $this->frontendController->sys_page->checkRecord($locData[1], $locData[2], 1);
-            $EMAIL_VARS['recipient'] = $record['subheader'];
-            $EMAIL_VARS['recipient_copy'] = $this->extractRecipientCopy($record['bodytext']);
-        }
-        // Hook for preprocessing of the content for formmails:
-        if (is_array($this->frontendController->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['sendFormmail-PreProcClass'])) {
-            foreach ($this->frontendController->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['sendFormmail-PreProcClass'] as $_classRef) {
-                $_procObj = GeneralUtility::getUserObj($_classRef);
-                $EMAIL_VARS = $_procObj->sendFormmail_preProcessVariables($EMAIL_VARS, $this);
-            }
-        }
-        $this->start($EMAIL_VARS);
-        $r = $this->sendtheMail();
-        $GLOBALS['TT']->setTSlogMessage('"Formmail" invoked, sending mail to ' . $EMAIL_VARS['recipient'], 0);
-    }
-
-    /**
-     * Extracts the value of recipient copy field from a formmail CE bodytext
-     *
-     * @param string $bodytext The content of the related bodytext field
-     * @return string The value of the recipient_copy field, or an empty string
-     */
-    protected function extractRecipientCopy($bodytext)
-    {
-        $fdef = array();
-        //|recipient_copy=hidden|karsten@localhost.localdomain
-        preg_match('/^[\\s]*\\|[\\s]*recipient_copy[\\s]*=[\\s]*hidden[\\s]*\\|(.*)$/m', $bodytext, $fdef);
-        return $fdef[1] ?: '';
-    }
-
-    /**
-     * Start function
-     * This class is able to generate a mail in formmail-style from the data in $V
-     * Fields:
-     *
-     * [recipient]:                    email-adress of the one to receive the mail. If array, then all values are expected to be recipients
-     * [attachment]:           ....
-     *
-     * [subject]:                      The subject of the mail
-     * [from_email]:           Sender email. If not set, [email] is used
-     * [from_name]:                    Sender name. If not set, [name] is used
-     * [replyto_email]:                Reply-to email. If not set [from_email] is used
-     * [replyto_name]:         Reply-to name. If not set [from_name] is used
-     * [organisation]:         Organization (header)
-     * [priority]:                     Priority, 1-5, default 3
-     * [html_enabled]:         If mail is sent as html
-     * [use_base64]:           If set, base64 encoding will be used instead of quoted-printable
-     *
-     * @param array $valueList Contains values for the field names listed above (with slashes removed if from POST input)
-     * @param bool $base64 Whether to base64 encode the mail content
-     * @return void
-     */
-    public function start($valueList, $base64 = false)
-    {
-        $this->mailMessage = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);
-        if ($GLOBALS['TSFE']->config['config']['formMailCharset']) {
-            // Respect formMailCharset if it was set
-            $this->characterSet = $GLOBALS['TSFE']->csConvObj->parse_charset($GLOBALS['TSFE']->config['config']['formMailCharset']);
-        } elseif ($GLOBALS['TSFE']->metaCharset != $GLOBALS['TSFE']->renderCharset) {
-            // Use metaCharset for mail if different from renderCharset
-            $this->characterSet = $GLOBALS['TSFE']->metaCharset;
-        } else {
-            // Otherwise use renderCharset as default
-            $this->characterSet = $GLOBALS['TSFE']->renderCharset;
-        }
-        if ($base64 || $valueList['use_base64']) {
-            $this->encoding = 'base64';
-        }
-        if (isset($valueList['recipient'])) {
-            // Convert form data from renderCharset to mail charset
-            $this->subject = $valueList['subject'] ? $valueList['subject'] : 'Formmail on ' . GeneralUtility::getIndpEnv('HTTP_HOST');
-            $this->subject = $this->sanitizeHeaderString($this->subject);
-            $this->fromName = $valueList['from_name'] ? $valueList['from_name'] : ($valueList['name'] ? $valueList['name'] : '');
-            $this->fromName = $this->sanitizeHeaderString($this->fromName);
-            $this->replyToName = $valueList['replyto_name'] ? $valueList['replyto_name'] : $this->fromName;
-            $this->replyToName = $this->sanitizeHeaderString($this->replyToName);
-            $this->organisation = $valueList['organisation'] ? $valueList['organisation'] : '';
-            $this->organisation = $this->sanitizeHeaderString($this->organisation);
-            $this->fromAddress = $valueList['from_email'] ? $valueList['from_email'] : ($valueList['email'] ? $valueList['email'] : '');
-            if (!GeneralUtility::validEmail($this->fromAddress)) {
-                $this->fromAddress = MailUtility::getSystemFromAddress();
-                $this->fromName = MailUtility::getSystemFromName();
-            }
-            $this->replyToAddress = $valueList['replyto_email'] ? $valueList['replyto_email'] : $this->fromAddress;
-            $this->priority = $valueList['priority'] ? MathUtility::forceIntegerInRange($valueList['priority'], 1, 5) : 3;
-            // Auto responder
-            $this->autoRespondMessage = trim($valueList['auto_respond_msg']) && $this->fromAddress ? trim($valueList['auto_respond_msg']) : '';
-            if ($this->autoRespondMessage !== '') {
-                // Check if the value of the auto responder message has been modified with evil intentions
-                $autoRespondChecksum = $valueList['auto_respond_checksum'];
-                $correctHmacChecksum = GeneralUtility::hmac($this->autoRespondMessage, 'content_form');
-                if ($autoRespondChecksum !== $correctHmacChecksum) {
-                    GeneralUtility::sysLog('Possible misuse of DataSubmissionController auto respond method. Subject: ' . $valueList['subject'], 'core', GeneralUtility::SYSLOG_SEVERITY_ERROR);
-                    return;
-                } else {
-                    $this->autoRespondMessage = $this->sanitizeHeaderString($this->autoRespondMessage);
-                }
-            }
-            $plainTextContent = '';
-            $htmlContent = '<table border="0" cellpadding="2" cellspacing="2">';
-            // Runs through $V and generates the mail
-            if (is_array($valueList)) {
-                foreach ($valueList as $key => $val) {
-                    if (!GeneralUtility::inList($this->reserved_names, $key)) {
-                        $space = strlen($val) > 60 ? LF : '';
-                        $val = is_array($val) ? implode($val, LF) : $val;
-                        // Convert form data from renderCharset to mail charset (HTML may use entities)
-                        $plainTextValue = $val;
-                        $HtmlValue = htmlspecialchars($val);
-                        $plainTextContent .= strtoupper($key) . ':  ' . $space . $plainTextValue . LF . $space;
-                        $htmlContent .= '<tr><td bgcolor="#eeeeee"><font face="Verdana" size="1"><strong>' . strtoupper($key) . '</strong></font></td><td bgcolor="#eeeeee"><font face="Verdana" size="1">' . nl2br($HtmlValue) . '&nbsp;</font></td></tr>';
-                    }
-                }
-            }
-            $htmlContent .= '</table>';
-            $this->plainContent = $plainTextContent;
-            if ($valueList['html_enabled']) {
-                $this->mailMessage->setBody($htmlContent, 'text/html', $this->characterSet);
-                $this->mailMessage->addPart($plainTextContent, 'text/plain', $this->characterSet);
-            } else {
-                $this->mailMessage->setBody($plainTextContent, 'text/plain', $this->characterSet);
-            }
-            for ($a = 0; $a < 10; $a++) {
-                $variableName = 'attachment' . ($a ?: '');
-                if (!isset($_FILES[$variableName])) {
-                    continue;
-                }
-
-                if ($_FILES[$variableName]['error'] !== UPLOAD_ERR_OK) {
-                    GeneralUtility::sysLog(
-                        'Error in uploaded file in DataSubmissionController: temporary file "' .
-                            $_FILES[$variableName]['tmp_name'] . '" ("' . $_FILES[$variableName]['name'] . '") Error code: ' .
-                            $_FILES[$variableName]['error'],
-                        'core',
-                        GeneralUtility::SYSLOG_SEVERITY_ERROR
-                    );
-                    continue;
-                }
-
-                if (!is_uploaded_file($_FILES[$variableName]['tmp_name'])) {
-                    GeneralUtility::sysLog(
-                        'Possible abuse of DataSubmissionController: temporary file "' . $_FILES[$variableName]['tmp_name'] .
-                            '" ("' . $_FILES[$variableName]['name'] . '") was not an uploaded file.',
-                        'core',
-                        GeneralUtility::SYSLOG_SEVERITY_ERROR
-                    );
-                    continue;
-                }
-
-                $theFile = GeneralUtility::upload_to_tempfile($_FILES[$variableName]['tmp_name']);
-                $theName = $_FILES[$variableName]['name'];
-                if ($theFile && file_exists($theFile)) {
-                    if (filesize($theFile) < $GLOBALS['TYPO3_CONF_VARS']['FE']['formmailMaxAttachmentSize']) {
-                        $this->mailMessage->attach(\Swift_Attachment::fromPath($theFile)->setFilename($theName));
-                    }
-                }
-                $this->temporaryFiles[] = $theFile;
-            }
-            $from = $this->fromName ? array($this->fromAddress => $this->fromName) : array($this->fromAddress);
-            $this->recipient = $this->parseAddresses($valueList['recipient']);
-            $this->mailMessage->setSubject($this->subject)->setFrom($from)->setTo($this->recipient)->setPriority($this->priority);
-            $replyTo = $this->replyToName ? array($this->replyToAddress => $this->replyToName) : array($this->replyToAddress);
-            $this->mailMessage->setReplyTo($replyTo);
-            $this->mailMessage->getHeaders()->addTextHeader('Organization', $this->organisation);
-            if ($valueList['recipient_copy']) {
-                $this->mailMessage->setCc($this->parseAddresses($valueList['recipient_copy']));
-            }
-            $this->mailMessage->setCharset($this->characterSet);
-            // Ignore target encoding. This is handled automatically by Swift Mailer and overriding the defaults
-            // is not worth the trouble
-            // Log dirty header lines
-            if ($this->dirtyHeaders) {
-                GeneralUtility::sysLog('Possible misuse of DataSubmissionController: see TYPO3 devLog', 'core', GeneralUtility::SYSLOG_SEVERITY_ERROR);
-                if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['enable_DLOG']) {
-                    GeneralUtility::devLog('DataSubmissionController: ' . GeneralUtility::arrayToLogString($this->dirtyHeaders, '', 200), 'Core', 3);
-                }
-            }
-        }
-    }
-
-    /**
-     * Checks string for suspicious characters
-     *
-     * @param string $string String to check
-     * @return string Valid or empty string
-     */
-    protected function sanitizeHeaderString($string)
-    {
-        $pattern = '/[\\r\\n\\f\\e]/';
-        if (preg_match($pattern, $string) > 0) {
-            $this->dirtyHeaders[] = $string;
-            $string = '';
-        }
-        return $string;
-    }
-
-    /**
-     * Parses mailbox headers and turns them into an array.
-     *
-     * Mailbox headers are a comma separated list of 'name <email@example.org' combinations or plain email addresses (or a mix
-     * of these).
-     * The resulting array has key-value pairs where the key is either a number (no display name in the mailbox header) and the
-     * value is the email address, or the key is the email address and the value is the display name.
-     *
-     * @param string $rawAddresses Comma separated list of email addresses (optionally with display name)
-     * @return array Parsed list of addresses.
-     */
-    protected function parseAddresses($rawAddresses = '')
-    {
-        /** @var $addressParser \TYPO3\CMS\Core\Mail\Rfc822AddressesParser */
-        $addressParser = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\Rfc822AddressesParser::class, $rawAddresses);
-        $addresses = $addressParser->parseAddressList();
-        $addressList = array();
-        foreach ($addresses as $address) {
-            if ($address->personal) {
-                // Item with name found ( name <email@example.org> )
-                $addressList[$address->mailbox . '@' . $address->host] = $address->personal;
-            } else {
-                // Item without name found ( email@example.org )
-                $addressList[] = $address->mailbox . '@' . $address->host;
-            }
-        }
-        return $addressList;
-    }
-
-    /**
-     * Sends the actual mail and handles autorespond message
-     *
-     * @return bool
-     */
-    public function sendTheMail()
-    {
-        // Sending the mail requires the recipient and message to be set.
-        if (!$this->mailMessage->getTo() || !trim($this->mailMessage->getBody())) {
-            return false;
-        }
-        $this->mailMessage->send();
-        // Auto response
-        if ($this->autoRespondMessage) {
-            $theParts = explode('/', $this->autoRespondMessage, 2);
-            $theParts[0] = str_replace('###SUBJECT###', $this->subject, $theParts[0]);
-            $theParts[1] = str_replace(
-                array('/', '###MESSAGE###'),
-                array(LF, $this->plainContent),
-                $theParts[1]
-            );
-            /** @var $autoRespondMail \TYPO3\CMS\Core\Mail\MailMessage */
-            $autoRespondMail = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);
-            $autoRespondMail->setTo($this->fromAddress)->setSubject($theParts[0])->setFrom($this->recipient)->setBody($theParts[1]);
-            $autoRespondMail->send();
-        }
-        return $this->mailMessage->isSent();
-    }
-
-    /**
-     * Do some cleanup at the end (deleting attachment files)
-     */
-    public function __destruct()
-    {
-        foreach ($this->temporaryFiles as $file) {
-            if (GeneralUtility::isAllowedAbsPath($file) && GeneralUtility::isFirstPartOfStr($file, PATH_site . 'typo3temp/upload_temp_')) {
-                GeneralUtility::unlink_tempfile($file);
-            }
-        }
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Controller/WebFunctionWizardsBaseController.php b/typo3/sysext/compatibility6/Classes/Controller/WebFunctionWizardsBaseController.php
deleted file mode 100644 (file)
index 2e438aa..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Controller;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Backend\Module\BaseScriptClass;
-
-/**
- * The Wizard function in the Web>Info module
- * Creates a framework for adding wizard sub-sub-modules under the Wizard function in Web>Info
- */
-class WebFunctionWizardsBaseController extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule
-{
-    /**
-     * @var string
-     */
-    public $function_key = 'wiz';
-
-    /**
-     * Initialize.
-     * Calls parent init function and then the handleExternalFunctionValue() function from the parent class
-     *
-     * @param BaseScriptClass $pObj A reference to the parent (calling) object (which is probably an instance of an extension class to \TYPO3\CMS\Backend\Module\BaseScriptClass)
-     * @param array $conf The configuration set for this module - from global array TBE_MODULES_EXT
-     * @return void
-     */
-    public function init(&$pObj, $conf)
-    {
-        // OK, handles ordinary init. This includes setting up the menu array with ->modMenu
-        parent::init($pObj, $conf);
-        $this->handleExternalFunctionValue();
-    }
-
-    /**
-     * Modifies parent objects internal MOD_MENU array, adding items this module needs.
-     *
-     * @return array Items merged with the parent objects.
-     */
-    public function modMenu()
-    {
-        $GLOBALS['LANG']->includeLLFile('EXT:compatibility6/Resources/Private/Language/wizards.xlf');
-        $modMenuAdd = array(
-            $this->function_key => array()
-        );
-        $modMenuAdd[$this->function_key] = $this->pObj->mergeExternalItems($this->pObj->MCONF['name'], $this->function_key, $modMenuAdd[$this->function_key]);
-        $modMenuAdd[$this->function_key] = \TYPO3\CMS\Backend\Utility\BackendUtility::unsetMenuItems(
-            $this->pObj->modTSconfig['properties'],
-            $modMenuAdd[$this->function_key],
-            'menu.' . $this->function_key
-        );
-        return $modMenuAdd;
-    }
-
-    /**
-     * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
-     *
-     * @return string The content
-     */
-    public function main()
-    {
-        $menu = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
-            $this->pObj->id,
-            'SET[wiz]',
-            $this->pObj->MOD_SETTINGS['wiz'],
-            $this->pObj->MOD_MENU['wiz']
-        );
-
-        $content = '';
-        if (!empty($menu)) {
-            $menu = $GLOBALS['LANG']->getLL('wiz_lWizards', true) . ': ' . $menu;
-            $content = '<div>';
-            $content .= '<span class="text-nowrap">' . $menu . '</span>';
-            $content .= '</div>';
-            $content .= '<div style="padding-top: 20px;"></div>';
-        }
-
-        $content .= $this->extObjContent();
-        return $content;
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Controller/Wizard/FormsController.php b/typo3/sysext/compatibility6/Classes/Controller/Wizard/FormsController.php
deleted file mode 100644 (file)
index 4dacd43..0000000
+++ /dev/null
@@ -1,898 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Controller\Wizard;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use Psr\Http\Message\ServerRequestInterface;
-use Psr\Http\Message\ResponseInterface;
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * API comments:
- *
- * The form wizard can help you to create forms - it allows you to create almost any kind of HTML form elements and in any order and amount.
- *
- * The format for the resulting configuration code can be either a line-based configuration. That can look like this:
- *
- * Your name: | *name=input | (input your name here!)
- * Your Email: | *email=input
- * Your address: | address=textarea,40,10
- * Your Haircolor: | hair=radio |
- * upload | attachment=file
- * | quoted_printable=hidden | 0
- * | formtype_mail=submit | Send form
- * | html_enabled=hidden
- * | subject=hidden | This is the subject
- *
- *
- * Alternatively it can be XML. The same configuration from above looks like this in XML:
- *
- * <T3FormWizard>
- * <n2>
- * <type>input</type>
- * <label>Your name:</label>
- * <required>1</required>
- * <fieldname>name</fieldname>
- * <size></size>
- * <max></max>
- * <default>(input your name here!)</default>
- * </n2>
- * <n4>
- * <type>input</type>
- * <label>Your Email:</label>
- * <required>1</required>
- * <fieldname>email</fieldname>
- * <size></size>
- * <max></max>
- * <default></default>
- * </n4>
- * <n6>
- * <type>textarea</type>
- * <label>Your address:</label>
- * <fieldname>address</fieldname>
- * <cols>40</cols>
- * <rows>10</rows>
- * <default></default>
- * </n6>
- * <n8>
- * <type>radio</type>
- * <label>Your Haircolor:</label>
- * <fieldname>hair</fieldname>
- * <options></options>
- * </n8>
- * <n10>
- * <type>file</type>
- * <label>upload</label>
- * <fieldname>attachment</fieldname>
- * <size></size>
- * </n10>
- * <n12>
- * <type>hidden</type>
- * <label></label>
- * <fieldname>quoted_printable</fieldname>
- * <default>0</default>
- * </n12>
- * <n2000>
- * <fieldname>formtype_mail</fieldname>
- * <type>submit</type>
- * <default>Send form</default>
- * </n2000>
- * <n2002>
- * <fieldname>html_enabled</fieldname>
- * <type>hidden</type>
- * </n2002>
- * <n2004>
- * <fieldname>subject</fieldname>
- * <type>hidden</type>
- * <default>This is the subject</default>
- * </n2004>
- * <n20>
- * <content></content>
- * </n20>
- * </T3FormWizard>
- *
- *
- * The XML/phpArray structure is the internal format of the wizard.
- */
-class FormsController extends \TYPO3\CMS\Backend\Controller\Wizard\AbstractWizardController
-{
-    /**
-     * document template object
-     *
-     * @var \TYPO3\CMS\Backend\Template\DocumentTemplate
-     */
-    public $doc;
-
-    /**
-     * Content accumulation for the module.
-     *
-     * @var string
-     */
-    public $content;
-
-    /**
-     * Used to numerate attachments automatically.
-     *
-     * @var int
-     */
-    public $attachmentCounter = 0;
-
-    /**
-     * If set, the string version of the content is interpreted/written as XML instead of
-     * the original linebased kind. This variable still needs binding to the wizard parameters
-     * - but support is ready!
-     *
-     * @var int
-     */
-    public $xmlStorage = 0;
-
-    /**
-     * Wizard parameters, coming from TCEforms linking to the wizard.
-     *
-     * @var array
-     */
-    public $P;
-
-    /**
-     * The array which is constantly submitted by the multidimensional form of this wizard.
-     *
-     * @var array
-     */
-    public $FORMCFG;
-
-    /**
-     * Indicates if the form is of a dedicated type, like "formtype_mail" (for tt_content element "Form")
-     *
-     * @var string
-     */
-    public $special;
-
-    /**
-     * @var IconFactory
-     */
-    protected $iconFactory;
-
-    /**
-     * Constructor
-     */
-    public function __construct()
-    {
-        $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-        $this->getLanguageService()->includeLLFile('EXT:compatibility6/Resources/Private/Language/locallang_wizards.xlf');
-        $GLOBALS['SOBE'] = $this;
-
-        $this->init();
-    }
-
-    /**
-     * Initialization the class
-     *
-     * @return void
-     */
-    protected function init()
-    {
-        // GPvars:
-        $this->P = GeneralUtility::_GP('P');
-        $this->special = GeneralUtility::_GP('special');
-        $this->FORMCFG = GeneralUtility::_GP('FORMCFG');
-        // Setting options:
-        $this->xmlStorage = $this->P['params']['xmlOutput'];
-        // Document template object:
-        $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
-        $this->doc->setModuleTemplate('EXT:compatibility6/Resources/Private/Templates/Wizard/Forms.html');
-        // Setting form tag:
-        list($rUri) = explode('#', GeneralUtility::getIndpEnv('REQUEST_URI'));
-        $this->doc->form = '<form action="' . htmlspecialchars($rUri) . '" method="post" name="wizardForm">';
-    }
-
-    /**
-     * Injects the request object for the current request or subrequest
-     * As this controller goes only through the main() method, it is rather simple for now
-     *
-     * @param ServerRequestInterface $request the current request
-     * @param ResponseInterface $response
-     * @return ResponseInterface the response with the content
-     */
-    public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
-    {
-        $this->main();
-
-        $response->getBody()->write($this->content);
-        return $response;
-    }
-
-    /**
-     * Main function for rendering the form wizard HTML
-     *
-     * @return void
-     */
-    public function main()
-    {
-        if ($this->P['table'] && $this->P['field'] && $this->P['uid']) {
-            $this->content .= '<h2>' . $this->getLanguageService()->getLL('forms_title', true) . '</h2><div>' . $this->formsWizard() . '</div>';
-        } else {
-            $this->content .= '<h2>' . $this->getLanguageService()->getLL('forms_title', true) . '<div><span class="text-danger">' . $this->getLanguageService()->getLL('table_noData', true) . '</span></div>';
-        }
-        // Setting up the buttons and markers for docheader
-        $docHeaderButtons = $this->getButtons();
-        $markers['CSH'] = $docHeaderButtons['csh'];
-        $markers['CONTENT'] = $this->content;
-        // Build the <body> for the module
-        $this->content = $this->doc->startPage('Form Wizard');
-        $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
-        $this->content .= $this->doc->endPage();
-        $this->content = $this->doc->insertStylesAndJS($this->content);
-    }
-
-    /**
-     * Outputting the accumulated content to screen
-     *
-     * @return void
-     * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use mainAction() instead
-     */
-    public function printContent()
-    {
-        GeneralUtility::logDeprecatedFunction();
-        echo $this->content;
-    }
-
-    /**
-     * Create the panel of buttons for submitting the form or otherwise perform operations.
-     *
-     * @return array All available buttons as an assoc. array
-     */
-    protected function getButtons()
-    {
-        $buttons = array(
-            'csh' => '',
-            'csh_buttons' => '',
-            'close' => '',
-            'save' => '',
-            'save_close' => '',
-            'reload' => ''
-        );
-        if ($this->P['table'] && $this->P['field'] && $this->P['uid']) {
-            // CSH
-            $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'wizard_forms_wiz');
-            // CSH Buttons
-            $buttons['csh_buttons'] = BackendUtility::cshItem('xMOD_csh_corebe', 'wizard_forms_wiz_buttons');
-            // Close
-            $buttons['close'] = '<button class="c-inputButton" name="closedok" value="1" title=' . $this->getLanguageService()->sL('LLL:EXT:compatibility6/Resources/Private/Language/locallang.xlf:closeDoc', true) . '>' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</button>';
-            // Save
-            $buttons['save'] = '<button class="c-inputButton" name="savedok" value="1" title=' . $this->getLanguageService()->sL('LLL:EXT:compatibility6/Resources/Private/Language/locallang.xlf:saveDoc', true) . '>' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render() . '</button>';
-            // Save & Close
-            $buttons['save_close'] = '<button class="c-inputButton" name="saveandclosedok" value="1" title=' . $this->getLanguageService()->sL('LLL:EXT:compatibility6/Resources/Private/Language/locallang.xlf:saveCloseDoc', true) . '>' . $this->iconFactory->getIcon('actions-document-save-close', Icon::SIZE_SMALL)->render() . '</button>';
-            // Reload
-            $buttons['reload'] = '<button class="c-inputButton" name="_refresh" value="1" title="' . $this->getLanguageService()->getLL('forms_refresh', true) . '">' . $this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL)->render() . '</button>';
-        }
-        return $buttons;
-    }
-
-    /**
-     * Draws the form wizard content
-     *
-     * @return string HTML content for the form.
-     */
-    public function formsWizard()
-    {
-        if (!$this->checkEditAccess($this->P['table'], $this->P['uid'])) {
-            throw new \RuntimeException('Wizard Error: No access', 1385807526);
-        }
-        // First, check the references by selecting the record:
-        $row = BackendUtility::getRecord($this->P['table'], $this->P['uid']);
-        if (!is_array($row)) {
-            throw new \RuntimeException('Wizard Error: No reference to record', 1294587124);
-        }
-        // This will get the content of the form configuration code field to us - possibly
-        // cleaned up, saved to database etc. if the form has been submitted in the meantime.
-        $formCfgArray = $this->getConfigCode($row);
-        // Generation of the Form Wizards HTML code:
-        $content = $this->getFormHTML($formCfgArray, $row);
-        // Return content:
-        return $content;
-    }
-
-    /****************************
-     *
-     * Helper functions
-     *
-     ***************************/
-    /**
-     * Will get and return the configuration code string
-     * Will also save (and possibly redirect/exit) the content if a save button has been pressed
-     *
-     * @param array $row Current parent record row (passed by value!)
-     * @return array Configuration Array
-     * @access private
-     */
-    public function getConfigCode(&$row)
-    {
-        // If some data has been submitted, then construct
-        if (isset($this->FORMCFG['c'])) {
-            // Process incoming:
-            $this->changeFunc();
-            // Convert to string (either line based or XML):
-            if ($this->xmlStorage) {
-                // Convert the input array to XML:
-                $bodyText = GeneralUtility::array2xml_cs($this->FORMCFG['c'], 'T3FormWizard');
-                // Setting cfgArr directly from the input:
-                $cfgArr = $this->FORMCFG['c'];
-            } else {
-                // Convert the input array to a string of configuration code:
-                $bodyText = $this->cfgArray2CfgString($this->FORMCFG['c']);
-                // Create cfgArr from the string based configuration - that way it is cleaned
-                // up and any incompatibilities will be removed!
-                $cfgArr = $this->cfgString2CfgArray($bodyText);
-            }
-            // If a save button has been pressed, then save the new field content:
-            if (isset($_POST['savedok']) || isset($_POST['saveandclosedok'])) {
-                // Make TCEmain object:
-                $tce = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
-                $tce->stripslashes_values = 0;
-                // Put content into the data array:
-                $data = array();
-                $data[$this->P['table']][$this->P['uid']][$this->P['field']] = $bodyText;
-                if ($this->special == 'formtype_mail') {
-                    $data[$this->P['table']][$this->P['uid']]['subheader'] = $this->FORMCFG['recipient'];
-                }
-                // Perform the update:
-                $tce->start($data, array());
-                $tce->process_datamap();
-                // Re-load the record content:
-                $row = BackendUtility::getRecord($this->P['table'], $this->P['uid']);
-            }
-            // If the save/close or close button was pressed, then redirect the screen:
-            if (isset($_POST['saveandclosedok']) || isset($_POST['closedok'])) {
-                \TYPO3\CMS\Core\Utility\HttpUtility::redirect(GeneralUtility::sanitizeLocalUrl($this->P['returnUrl']));
-            }
-        } else {
-            // If nothing has been submitted, load the $bodyText variable from the selected database row:
-            if ($this->xmlStorage) {
-                $cfgArr = GeneralUtility::xml2array($row[$this->P['field']]);
-            } else {
-                // Regular linebased form configuration:
-                $cfgArr = $this->cfgString2CfgArray($row[$this->P['field']]);
-            }
-            $cfgArr = is_array($cfgArr) ? $cfgArr : array();
-        }
-        // Return configuration code:
-        return $cfgArr;
-    }
-
-    /**
-     * Creates the HTML for the Form Wizard:
-     *
-     * @param string $formCfgArray Form config array
-     * @param array $row Current parent record array
-     * @return string HTML for the form wizard
-     * @access private
-     */
-    public function getFormHTML($formCfgArray, $row)
-    {
-        // Initialize variables:
-        $specParts = array();
-        $hiddenFields = array();
-        $tRows = array();
-        // Set header row:
-        $cells = array(
-            $this->getLanguageService()->getLL('forms_preview', true) . ':',
-            $this->getLanguageService()->getLL('forms_element', true) . ':',
-            $this->getLanguageService()->getLL('forms_config', true) . ':'
-        );
-        $tRows[] = '
-                       <tr id="typo3-formWizardHeader">
-                               <th>&nbsp;</th>
-                               <th><strong>' . implode('</strong></th>
-                               <th><strong>', $cells) . '</strong></th>
-                       </tr>';
-        // Traverse the number of form elements:
-        $k = 0;
-        foreach ($formCfgArray as $confData) {
-            // Initialize:
-            $cells = array();
-            // If there is a configuration line which is active, then render it:
-            if (!isset($confData['comment'])) {
-                // Special parts:
-                if ($this->special == 'formtype_mail' && GeneralUtility::inList('formtype_mail,subject,html_enabled', $confData['fieldname'])) {
-                    $specParts[$confData['fieldname']] = $confData['default'];
-                } else {
-                    // Render title/field preview COLUMN
-                    $cells[] = $confData['type'] != 'hidden' ? '<strong>' . htmlspecialchars($confData['label']) . '</strong>' : '';
-                    // Render general type/title COLUMN:
-                    $temp_cells = array();
-                    // Field type selector:
-                    $opt = array();
-                    $opt[] = '<option value=""></option>';
-                    $types = explode(',', 'input,textarea,select,check,radio,password,file,hidden,submit,property,label');
-                    foreach ($types as $t) {
-                        $opt[] = '
-                                                               <option value="' . $t . '"' . ($confData['type'] == $t ? ' selected="selected"' : '') . '>' . $this->getLanguageService()->getLL(('forms_type_' . $t), true) . '</option>';
-                    }
-                    $temp_cells[$this->getLanguageService()->getLL('forms_type')] = '
-                                                       <select name="FORMCFG[c][' . ($k + 1) * 2 . '][type]">
-                                                               ' . implode('
-                                                               ', $opt) . '
-                                                       </select>';
-                    // Title field:
-                    if (!GeneralUtility::inList('hidden,submit', $confData['type'])) {
-                        $temp_cells[$this->getLanguageService()->getLL('forms_label')] = '<input type="text"' . $this->doc->formWidth(15) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][label]" value="' . htmlspecialchars($confData['label']) . '" />';
-                    }
-                    // Required checkbox:
-                    if (!GeneralUtility::inList('check,hidden,submit,label', $confData['type'])) {
-                        $temp_cells[$this->getLanguageService()->getLL('forms_required')] = '<input type="checkbox" name="FORMCFG[c][' . ($k + 1) * 2 . '][required]" value="1"' . ($confData['required'] ? ' checked="checked"' : '') . ' title="' . $this->getLanguageService()->getLL('forms_required', true) . '" />';
-                    }
-                    // Put sub-items together into table cell:
-                    $cells[] = $this->formatCells($temp_cells);
-                    // Render specific field configuration COLUMN:
-                    $temp_cells = array();
-                    // Fieldname
-                    if ($this->special == 'formtype_mail' && $confData['type'] == 'file') {
-                        $confData['fieldname'] = 'attachment' . ++$this->attachmentCounter;
-                    }
-                    if (!GeneralUtility::inList('label', $confData['type'])) {
-                        $temp_cells[$this->getLanguageService()->getLL('forms_fieldName')] = '<input type="text"' . $this->doc->formWidth(10) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][fieldname]" value="' . htmlspecialchars($confData['fieldname']) . '" title="' . $this->getLanguageService()->getLL('forms_fieldName', true) . '" />';
-                    }
-                    // Field configuration depending on the fields type:
-                    switch ((string)$confData['type']) {
-                        case 'textarea':
-                            $temp_cells[$this->getLanguageService()->getLL('forms_cols')] = '<input type="text"' . $this->doc->formWidth(5) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][cols]" value="' . htmlspecialchars($confData['cols']) . '" title="' . $this->getLanguageService()->getLL('forms_cols', true) . '" />';
-                            $temp_cells[$this->getLanguageService()->getLL('forms_rows')] = '<input type="text"' . $this->doc->formWidth(5) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][rows]" value="' . htmlspecialchars($confData['rows']) . '" title="' . $this->getLanguageService()->getLL('forms_rows', true) . '" />';
-                            $temp_cells[$this->getLanguageService()->getLL('forms_extra')] = '<input type="checkbox" name="FORMCFG[c][' . ($k + 1) * 2 . '][extra]" value="OFF"' . ($confData['extra'] == 'OFF' ? ' checked="checked"' : '') . ' title="' . $this->getLanguageService()->getLL('forms_extra', true) . '" />';
-                            break;
-                        case 'input':
-
-                        case 'password':
-                            $temp_cells[$this->getLanguageService()->getLL('forms_size')] = '<input type="text"' . $this->doc->formWidth(5) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][size]" value="' . htmlspecialchars($confData['size']) . '" title="' . $this->getLanguageService()->getLL('forms_size', true) . '" />';
-                            $temp_cells[$this->getLanguageService()->getLL('forms_max')] = '<input type="text"' . $this->doc->formWidth(5) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][max]" value="' . htmlspecialchars($confData['max']) . '" title="' . $this->getLanguageService()->getLL('forms_max', true) . '" />';
-                            break;
-                        case 'file':
-                            $temp_cells[$this->getLanguageService()->getLL('forms_size')] = '<input type="text"' . $this->doc->formWidth(5) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][size]" value="' . htmlspecialchars($confData['size']) . '" title="' . $this->getLanguageService()->getLL('forms_size', true) . '" />';
-                            break;
-                        case 'select':
-                            $temp_cells[$this->getLanguageService()->getLL('forms_size')] = '<input type="text"' . $this->doc->formWidth(5) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][size]" value="' . htmlspecialchars($confData['size']) . '" title="' . $this->getLanguageService()->getLL('forms_size', true) . '" />';
-                            $temp_cells[$this->getLanguageService()->getLL('forms_autosize')] = '<input type="checkbox" name="FORMCFG[c][' . ($k + 1) * 2 . '][autosize]" value="1"' . ($confData['autosize'] ? ' checked="checked"' : '') . ' title="' . $this->getLanguageService()->getLL('forms_autosize', true) . '" />';
-                            $temp_cells[$this->getLanguageService()->getLL('forms_multiple')] = '<input type="checkbox" name="FORMCFG[c][' . ($k + 1) * 2 . '][multiple]" value="1"' . ($confData['multiple'] ? ' checked="checked"' : '') . ' title="' . $this->getLanguageService()->getLL('forms_multiple', true) . '" />';
-                            break;
-                    }
-                    // Field configuration depending on the fields type:
-                    switch ((string)$confData['type']) {
-                        case 'textarea':
-
-                        case 'input':
-
-                        case 'password':
-                            if (trim($confData['specialEval']) !== '') {
-                                $hiddenFields[] = '<input type="hidden" name="FORMCFG[c][' . ($k + 1) * 2 . '][specialEval]" value="' . htmlspecialchars($confData['specialEval']) . '" />';
-                            }
-                            break;
-                    }
-                    // Default data
-                    if ($confData['type'] == 'select' || $confData['type'] == 'radio') {
-                        $temp_cells[$this->getLanguageService()->getLL('forms_options')] = '<textarea ' . $this->doc->formWidth(15) . ' rows="4" name="FORMCFG[c][' . ($k + 1) * 2 . '][options]" title="' . $this->getLanguageService()->getLL('forms_options', true) . '">' . htmlspecialchars($confData['default']) . '</textarea>';
-                    } elseif ($confData['type'] == 'check') {
-                        $temp_cells[$this->getLanguageService()->getLL('forms_checked')] = '<input type="checkbox" name="FORMCFG[c][' . ($k + 1) * 2 . '][default]" value="1"' . (trim($confData['default']) ? ' checked="checked"' : '') . ' title="' . $this->getLanguageService()->getLL('forms_checked', true) . '" />';
-                    } elseif ($confData['type'] && $confData['type'] != 'file') {
-                        $temp_cells[$this->getLanguageService()->getLL('forms_default')] = '<input type="text"' . $this->doc->formWidth(15) . ' name="FORMCFG[c][' . ($k + 1) * 2 . '][default]" value="' . htmlspecialchars($confData['default']) . '" title="' . $this->getLanguageService()->getLL('forms_default', true) . '" />';
-                    }
-                    $cells[] = $confData['type'] ? $this->formatCells($temp_cells) : '';
-                    // CTRL panel for an item (move up/down/around):
-                    $ctrl = '';
-                    $onClick = 'document.wizardForm.action+=\'#ANC_' . (($k + 1) * 2 - 2) . '\';';
-                    $onClick = ' onclick="' . htmlspecialchars($onClick) . '"';
-                    // @todo $inputStyle undefined
-                    $brTag = $inputStyle ? '' : '<br />';
-                    if ($k != 1) {
-                        $ctrl .= '<button name="FORMCFG[row_top][' . ($k + 1) * 2 . ']"' . $onClick . ' title="' . $this->getLanguageService()->getLL('table_top', true) . '">' . $this->iconFactory->getIcon('actions-move-to-top', Icon::SIZE_SMALL)->render() . '</button>' . $brTag;
-                        $ctrl .= '<button name="FORMCFG[row_up][' . ($k + 1) * 2 . ']"' . $onClick . ' title="' . $this->getLanguageService()->getLL('table_up', true) . '">' . $this->iconFactory->getIcon('actions-move-up', Icon::SIZE_SMALL)->render() . '</button>' . $brTag;
-                    }
-                    $ctrl .= '<button name="FORMCFG[row_remove][' . ($k + 1) * 2 . ']" ' . $onClick . ' title = "' . $this->getLanguageService()->getLL('table_removeRow', true) . '">' . $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render() . '</button>' . $brTag;
-
-                    if ($k != (count($formCfgArray)/2)) {
-                        $ctrl .= '<button name="FORMCFG[row_down][' . ($k + 1) * 2 . ']"' . $onClick . ' title="' . $this->getLanguageService()->getLL('table_down', true) . '">' . $this->iconFactory->getIcon('actions-move-down', Icon::SIZE_SMALL)->render() . '</button>' . $brTag;
-                        $ctrl .= '<button name="FORMCFG[row_bottom][' . ($k + 1) * 2 . ']"' . $onClick . ' title="' . $this->getLanguageService()->getLL('table_bottom', true) . '">' . $this->iconFactory->getIcon('actions-move-to-bottom', Icon::SIZE_SMALL)->render() . '</button>' . $brTag;
-                    }
-
-                    $ctrl .= '<button name="FORMCFG[row_add][' . ($k + 1) * 2 . ']"' . $onClick . ' title="' . $this->getLanguageService()->getLL('table_addRow', true) . '">' . $this->iconFactory->getIcon('actions-template-new', Icon::SIZE_SMALL)->render() . '</button>' . $brTag;
-                    $ctrl = '<span class="c-wizButtonsV">' . $ctrl . '</span>';
-                    // Finally, put together the full row from the generated content above:
-                    $tRows[] = '
-                                               <tr>
-                                                       <td><a name="ANC_' . ($k + 1) * 2 . '"></a>' . $ctrl . '</td>
-                                                       <td>' . implode('</td>
-                                                       <td valign="top">', $cells) . '</td>
-                                               </tr>';
-                }
-            } else {
-                $hiddenFields[] = '<input type="hidden" name="FORMCFG[c][' . ($k + 1) * 2 . '][comment]" value="' . htmlspecialchars($confData['comment']) . '" />';
-            }
-            // Increment counter:
-            $k++;
-        }
-        // If the form is of the special type "formtype_mail" (used for tt_content elements):
-        if ($this->special == 'formtype_mail') {
-            // Blank spacer:
-            $tRows[] = '
-                               <tr>
-                                       <td colspan="4">&nbsp;</td>
-                               </tr>';
-            // Header:
-            $tRows[] = '
-                               <tr>
-                                       <th colspan="4"><h4>' . $this->getLanguageService()->getLL('forms_special_eform', true) . ': ' . BackendUtility::cshItem('xMOD_csh_corebe', 'wizard_forms_wiz_formmail_info') . '</h4></th>
-                               </tr>';
-            // "FORM type":
-            $tRows[] = '
-                               <tr>
-                                       <td colspan="2">&nbsp;</td>
-                                       <td>' . $this->getLanguageService()->getLL('forms_eform_formtype_mail', true) . ':</td>
-                                       <td>
-                                               <input type="hidden" name="FORMCFG[c][' . 1000 * 2 . '][fieldname]" value="formtype_mail" />
-                                               <input type="hidden" name="FORMCFG[c][' . 1000 * 2 . '][type]" value="submit" />
-                                               <input type="text"' . $this->doc->formWidth(15) . ' name="FORMCFG[c][' . 1000 * 2 . '][default]" value="' . htmlspecialchars($specParts['formtype_mail']) . '" />
-                                       </td>
-                               </tr>';
-            // "Send HTML mail":
-            $tRows[] = '
-                               <tr>
-                                       <td colspan="2">&nbsp;</td>
-                                       <td>' . $this->getLanguageService()->getLL('forms_eform_html_enabled', true) . ':</td>
-                                       <td>
-                                               <input type="hidden" name="FORMCFG[c][' . 1001 * 2 . '][fieldname]" value="html_enabled" />
-                                               <input type="hidden" name="FORMCFG[c][' . 1001 * 2 . '][type]" value="hidden" />
-                                               <input type="checkbox" name="FORMCFG[c][' . 1001 * 2 . '][default]" value="1"' . ($specParts['html_enabled'] ? ' checked="checked"' : '') . ' />
-                                       </td>
-                               </tr>';
-            // "Subject":
-            $tRows[] = '
-                               <tr>
-                                       <td colspan="2">&nbsp;</td>
-                                       <td>' . $this->getLanguageService()->getLL('forms_eform_subject', true) . ':</td>
-                                       <td>
-                                               <input type="hidden" name="FORMCFG[c][' . 1002 * 2 . '][fieldname]" value="subject" />
-                                               <input type="hidden" name="FORMCFG[c][' . 1002 * 2 . '][type]" value="hidden" />
-                                               <input type="text"' . $this->doc->formWidth(15) . ' name="FORMCFG[c][' . 1002 * 2 . '][default]" value="' . htmlspecialchars($specParts['subject']) . '" />
-                                       </td>
-                               </tr>';
-            // Recipient:
-            $tRows[] = '
-                               <tr>
-                                       <td colspan="2">&nbsp;</td>
-                                       <td>' . $this->getLanguageService()->getLL('forms_eform_recipient', true) . ':</td>
-                                       <td>
-                                               <input type="text"' . $this->doc->formWidth(15) . ' name="FORMCFG[recipient]" value="' . htmlspecialchars($row['subheader']) . '" />
-                                       </td>
-                               </tr>';
-        }
-        $content = '';
-        // Implode all table rows into a string, wrapped in table tags.
-        $content .= '
-
-                       <!--
-                               Form wizard
-                       -->
-                       <table class="table table-bordered table-condensed" id="typo3-formwizard">
-                               ' . implode('', $tRows) . '
-                       </table>';
-        // Add hidden fields:
-        $content .= implode('', $hiddenFields);
-        // Return content:
-        return $content;
-    }
-
-    /**
-     * Detects if a control button (up/down/around/delete) has been pressed for an item and accordingly it will manipulate the internal FORMCFG array
-     *
-     * @return void
-     * @access private
-     */
-    public function changeFunc()
-    {
-        if ($this->FORMCFG['row_remove']) {
-            $kk = key($this->FORMCFG['row_remove']);
-            $cmd = 'row_remove';
-        } elseif ($this->FORMCFG['row_add']) {
-            $kk = key($this->FORMCFG['row_add']);
-            $cmd = 'row_add';
-        } elseif ($this->FORMCFG['row_top']) {
-            $kk = key($this->FORMCFG['row_top']);
-            $cmd = 'row_top';
-        } elseif ($this->FORMCFG['row_bottom']) {
-            $kk = key($this->FORMCFG['row_bottom']);
-            $cmd = 'row_bottom';
-        } elseif ($this->FORMCFG['row_up']) {
-            $kk = key($this->FORMCFG['row_up']);
-            $cmd = 'row_up';
-        } elseif ($this->FORMCFG['row_down']) {
-            $kk = key($this->FORMCFG['row_down']);
-            $cmd = 'row_down';
-        }
-        if ($cmd && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($kk)) {
-            if (substr($cmd, 0, 4) == 'row_') {
-                switch ($cmd) {
-                    case 'row_remove':
-                        unset($this->FORMCFG['c'][$kk]);
-                        break;
-                    case 'row_add':
-                        $this->FORMCFG['c'][$kk + 1] = array();
-                        break;
-                    case 'row_top':
-                        $this->FORMCFG['c'][1] = $this->FORMCFG['c'][$kk];
-                        unset($this->FORMCFG['c'][$kk]);
-                        break;
-                    case 'row_bottom':
-                        $this->FORMCFG['c'][1000000] = $this->FORMCFG['c'][$kk];
-                        unset($this->FORMCFG['c'][$kk]);
-                        break;
-                    case 'row_up':
-                        $this->FORMCFG['c'][$kk - 3] = $this->FORMCFG['c'][$kk];
-                        unset($this->FORMCFG['c'][$kk]);
-                        break;
-                    case 'row_down':
-                        $this->FORMCFG['c'][$kk + 3] = $this->FORMCFG['c'][$kk];
-                        unset($this->FORMCFG['c'][$kk]);
-                        break;
-                }
-                ksort($this->FORMCFG['c']);
-            }
-        }
-    }
-
-    /**
-     * Converts the input array to a configuration code string
-     *
-     * @param array $cfgArr Array of form configuration (follows the input structure from the form wizard POST form)
-     * @return string The array converted into a string with line-based configuration.
-     * @see cfgString2CfgArray()
-     */
-    public function cfgArray2CfgString($cfgArr)
-    {
-        // Initialize:
-        $inLines = array();
-        // Traverse the elements of the form wizard and transform the settings into configuration code.
-        foreach ($cfgArr as $vv) {
-            // If "content" is found, then just pass it over.
-            if ($vv['comment']) {
-                $inLines[] = trim($vv['comment']);
-            } else {
-                // Begin to put together the single-line configuration code of this field:
-                // Reset:
-                $thisLine = array();
-                // Set Label:
-                $thisLine[0] = str_replace('|', '', $vv['label']);
-                // Set Type:
-                if ($vv['type']) {
-                    $thisLine[1] = ($vv['required'] ? '*' : '') . str_replace(',', '', (($vv['fieldname'] ? $vv['fieldname'] . '=' : '') . $vv['type']));
-                    // Default:
-                    $tArr = array('', '', '', '', '', '');
-                    switch ((string)$vv['type']) {
-                        case 'textarea':
-                            if ((int)$vv['cols']) {
-                                $tArr[0] = (int)$vv['cols'];
-                            }
-                            if ((int)$vv['rows']) {
-                                $tArr[1] = (int)$vv['rows'];
-                            }
-                            if (trim($vv['extra'])) {
-                                $tArr[2] = trim($vv['extra']);
-                            }
-                            if ($vv['specialEval'] !== '') {
-                                // Preset blank default value so position 3 can get a value...
-                                $thisLine[2] = '';
-                                $thisLine[3] = $vv['specialEval'];
-                            }
-                            break;
-                        case 'input':
-                        case 'password':
-                            if ((int)$vv['size']) {
-                                $tArr[0] = (int)$vv['size'];
-                            }
-                            if ((int)$vv['max']) {
-                                $tArr[1] = (int)$vv['max'];
-                            }
-                            if ($vv['specialEval'] !== '') {
-                                // Preset blank default value so position 3 can get a value...
-                                $thisLine[2] = '';
-                                $thisLine[3] = $vv['specialEval'];
-                            }
-                            break;
-                        case 'file':
-                            if ((int)$vv['size']) {
-                                $tArr[0] = (int)$vv['size'];
-                            }
-                            break;
-                        case 'select':
-                            if ((int)$vv['size']) {
-                                $tArr[0] = (int)$vv['size'];
-                            }
-                            if ($vv['autosize']) {
-                                $tArr[0] = 'auto';
-                            }
-                            if ($vv['multiple']) {
-                                $tArr[1] = 'm';
-                            }
-                            break;
-                    }
-                    $tArr = $this->cleanT($tArr);
-                    if (!empty($tArr)) {
-                        $thisLine[1] .= ',' . implode(',', $tArr);
-                    }
-                    $thisLine[1] = str_replace('|', '', $thisLine[1]);
-                    // Default:
-                    if ($vv['type'] == 'select' || $vv['type'] == 'radio') {
-                        $options = str_replace(',', '', $vv['options']);
-                        $options = str_replace(
-                            array(CRLF, CR, LF),
-                            ', ',
-                            $options);
-                        $thisLine[2] = $options;
-                    } elseif ($vv['type'] == 'check') {
-                        if ($vv['default']) {
-                            $thisLine[2] = 1;
-                        }
-                    } elseif (trim($vv['default']) !== '') {
-                        $thisLine[2] = $vv['default'];
-                    }
-                    if (isset($thisLine[2])) {
-                        $thisLine[2] = str_replace('|', '', $thisLine[2]);
-                    }
-                }
-                // Compile the final line:
-                $inLines[] = preg_replace('/[
-
-]*/', '', implode(' | ', $thisLine));
-            }
-        }
-        // Finally, implode the lines into a string, and return it:
-        return implode(LF, $inLines);
-    }
-
-    /**
-     * Converts the input configuration code string into an array
-     *
-     * @param string $cfgStr Configuration code
-     * @return array Configuration array
-     * @see cfgArray2CfgString()
-     */
-    public function cfgString2CfgArray($cfgStr)
-    {
-        // Traverse the number of form elements:
-        $tLines = explode(LF, $cfgStr);
-        $attachmentCounter = 0;
-        foreach ($tLines as $k => $v) {
-            // Initialize:
-            $confData = array();
-            $val = trim($v);
-            // Accept a line as configuration if a) it is blank(! - because blank lines indicates new,
-            // unconfigured fields) or b) it is NOT a comment.
-            if (!$val || strcspn($val, '#/')) {
-                // Split:
-                $parts = GeneralUtility::trimExplode('|', $val);
-                // Label:
-                $confData['label'] = trim($parts[0]);
-                // Field:
-                $fParts = GeneralUtility::trimExplode(',', $parts[1]);
-                $fParts[0] = trim($fParts[0]);
-                if ($fParts[0][0] === '*') {
-                    $confData['required'] = 1;
-                    $fParts[0] = substr($fParts[0], 1);
-                }
-                $typeParts = GeneralUtility::trimExplode('=', $fParts[0]);
-                $confData['type'] = trim(strtolower(end($typeParts)));
-                if ($confData['type']) {
-                    if (count($typeParts) === 1) {
-                        $confData['fieldname'] = substr(preg_replace('/[^a-zA-Z0-9_]/', '', str_replace(' ', '_', trim($parts[0]))), 0, 30);
-                        // Attachment names...
-                        if ($confData['type'] == 'file') {
-                            $confData['fieldname'] = 'attachment' . $attachmentCounter;
-                            $attachmentCounter = (int)$attachmentCounter + 1;
-                        }
-                    } else {
-                        $confData['fieldname'] = str_replace(' ', '_', trim($typeParts[0]));
-                    }
-                    switch ((string)$confData['type']) {
-                        case 'select':
-                        case 'radio':
-                            $confData['default'] = implode(LF, GeneralUtility::trimExplode(',', $parts[2]));
-                            break;
-                        default:
-                            $confData['default'] = trim($parts[2]);
-                    }
-                    // Field configuration depending on the fields type:
-                    switch ((string)$confData['type']) {
-                        case 'textarea':
-                            $confData['cols'] = $fParts[1];
-                            $confData['rows'] = $fParts[2];
-                            $confData['extra'] = strtoupper($fParts[3]) == 'OFF' ? 'OFF' : '';
-                            $confData['specialEval'] = trim($parts[3]);
-                            break;
-                        case 'input':
-                        case 'password':
-                            $confData['size'] = $fParts[1];
-                            $confData['max'] = $fParts[2];
-                            $confData['specialEval'] = trim($parts[3]);
-                            break;
-                        case 'file':
-                            $confData['size'] = $fParts[1];
-                            break;
-                        case 'select':
-                            $confData['size'] = (int)$fParts[1] ? $fParts[1] : '';
-                            $confData['autosize'] = strtolower(trim($fParts[1])) === 'auto' ? 1 : 0;
-                            $confData['multiple'] = strtolower(trim($fParts[2])) === 'm' ? 1 : 0;
-                            break;
-                    }
-                }
-            } else {
-                // No configuration, only a comment:
-                $confData = array(
-                    'comment' => $val
-                );
-            }
-            // Adding config array:
-            $cfgArr[] = $confData;
-        }
-        // Return cfgArr
-        return $cfgArr;
-    }
-
-    /**
-     * Removes any "trailing elements" in the array which consists of whitespace (little like trim() does for strings, so this does for arrays)
-     *
-     * @param array $tArr Single dim array
-     * @return array Processed array
-     * @access private
-     */
-    public function cleanT($tArr)
-    {
-        for ($a = count($tArr); $a > 0; $a--) {
-            if ((string)$tArr[$a - 1] !== '') {
-                break;
-            } else {
-                unset($tArr[$a - 1]);
-            }
-        }
-        return $tArr;
-    }
-
-    /**
-     * Wraps items in $fArr in table cells/rows, displaying them vertically.
-     *
-     * @param array $fArr Array of label/HTML pairs.
-     * @return string HTML table
-     * @access private
-     */
-    public function formatCells($fArr)
-    {
-        // Traverse the elements in $fArr and wrap them in table cells:
-        $lines = array();
-        foreach ($fArr as $l => $c) {
-            $lines[] = '
-                               <tr>
-                                       <td nowrap="nowrap">' . htmlspecialchars(($l . ':')) . '&nbsp;</td>
-                                       <td>' . $c . '</td>
-                               </tr>';
-        }
-        $lines[] = '
-                       <tr>
-                               <td colspan="2"></td>
-                       </tr>';
-        // Wrap in table and return:
-        return '
-                       <table>
-                               ' . implode('', $lines) . '
-                       </table>';
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Form/Container/FlexFormElementContainer.php b/typo3/sysext/compatibility6/Classes/Form/Container/FlexFormElementContainer.php
deleted file mode 100644 (file)
index 0f04b2f..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Form\Container;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Backend\Form\Container\AbstractContainer;
-use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Lang\LanguageService;
-use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
-use TYPO3\CMS\Core\Type\Bitmask\JsConfirmation;
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-
-/**
- * The container handles single elements.
- *
- * This one is called by FlexFormTabsContainer, FlexFormNoTabsContainer or FlexFormContainerContainer.
- * For single fields, the code is similar to SingleFieldContainer, processing will end up in single
- * element classes depending on specific type of an element. Additionally, it determines if a
- * section is handled and hands over to FlexFormSectionContainer in this case.
- */
-class FlexFormElementContainer extends AbstractContainer
-{
-    /**
-     * Entry method
-     *
-     * @return array As defined in initializeResultArray() of AbstractNode
-     */
-    public function render()
-    {
-        $table = $this->data['tableName'];
-        $row = $this->data['databaseRow'];
-        $flexFormDataStructureArray = $this->data['flexFormDataStructureArray'];
-        $flexFormRowData = $this->data['flexFormRowData'];
-        $flexFormFormPrefix = $this->data['flexFormFormPrefix'];
-        $parameterArray = $this->data['parameterArray'];
-        $metaData = $this->data['parameterArray']['fieldConf']['config']['ds']['meta'];
-
-        $languageService = $this->getLanguageService();
-        /** @var IconFactory $iconFactory */
-        $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-        $resultArray = $this->initializeResultArray();
-        foreach ($flexFormDataStructureArray as $flexFormFieldName => $flexFormFieldArray) {
-            if (
-                // No item array found at all
-                !is_array($flexFormFieldArray)
-                // Not a section or container and not a list of single items
-                || (!isset($flexFormFieldArray['type']) && !is_array($flexFormFieldArray['config']))
-            ) {
-                continue;
-            }
-
-            if ($flexFormFieldArray['type'] === 'array') {
-                // Section
-                if (empty($flexFormFieldArray['section'])) {
-                    $resultArray['html'] = LF . 'Section expected at ' . $flexFormFieldName . ' but not found';
-                    continue;
-                }
-
-                $sectionTitle = '';
-                if (!empty($flexFormFieldArray['title'])) {
-                    $sectionTitle = $languageService->sL($flexFormFieldArray['title']);
-                }
-
-                $options = $this->data;
-                $options['flexFormDataStructureArray'] = $flexFormFieldArray['el'];
-                $options['flexFormRowData'] = is_array($flexFormRowData[$flexFormFieldName]['el']) ? $flexFormRowData[$flexFormFieldName]['el'] : array();
-                $options['flexFormSectionType'] = $flexFormFieldName;
-                $options['flexFormSectionTitle'] = $sectionTitle;
-                $options['renderType'] = 'flexFormSectionContainer';
-                $sectionContainerResult = $this->nodeFactory->create($options)->render();
-                $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $sectionContainerResult);
-            } else {
-                if (is_array($metaData) && isset($metaData['langChildren']) && isset($metaData['languagesOnElement'])) {
-                    $lkeys = $metaData['languagesOnElement'];
-                    array_walk($lkeys, function (&$value) {
-                        $value = 'v' . $value;
-                    });
-                } else {
-                    $lkeys = array('vDEF');
-                }
-                $html = array();
-                foreach ($lkeys as $lkey) {
-                    // Set up options for single element
-                    $fakeParameterArray = array(
-                        'fieldConf' => array(
-                            'label' => $languageService->sL(trim($flexFormFieldArray['label'])),
-                            'config' => $flexFormFieldArray['config'],
-                            'defaultExtras' => $flexFormFieldArray['defaultExtras'],
-                            'onChange' => $flexFormFieldArray['onChange'],
-                        ),
-                    );
-
-                    $alertMsgOnChange = '';
-                    if (
-                        $fakeParameterArray['fieldConf']['onChange'] === 'reload'
-                        || !empty($GLOBALS['TCA'][$table]['ctrl']['type']) && $GLOBALS['TCA'][$table]['ctrl']['type'] === $flexFormFieldName
-                        || !empty($GLOBALS['TCA'][$table]['ctrl']['requestUpdate']) && GeneralUtility::inList($GLOBALS['TCA'][$table]['ctrl']['requestUpdate'], $flexFormFieldName)
-                    ) {
-                        if ($this->getBackendUserAuthentication()->jsConfirmation(JsConfirmation::TYPE_CHANGE)) {
-                            $alertMsgOnChange = 'top.TYPO3.Modal.confirm(TBE_EDITOR.labels.refreshRequired.title, TBE_EDITOR.labels.refreshRequired.content).on("button.clicked", function(e) { if (e.target.name == "ok" && TBE_EDITOR.checkSubmit(-1)) { TBE_EDITOR.submitForm() } top.TYPO3.Modal.dismiss(); });';
-                        } else {
-                            $alertMsgOnChange = 'if (TBE_EDITOR.checkSubmit(-1)){ TBE_EDITOR.submitForm();}';
-                        }
-                    }
-                    $fakeParameterArray['fieldChangeFunc'] = $parameterArray['fieldChangeFunc'];
-                    if ($alertMsgOnChange) {
-                        $fakeParameterArray['fieldChangeFunc']['alert'] = $alertMsgOnChange;
-                    }
-
-                    $fakeParameterArray['onFocus'] = $parameterArray['onFocus'];
-                    $fakeParameterArray['label'] = $parameterArray['label'];
-                    $fakeParameterArray['itemFormElName'] = $parameterArray['itemFormElName'] . $flexFormFormPrefix . '[' . $flexFormFieldName . '][' . $lkey . ']';
-                    $fakeParameterArray['itemFormElID'] = $fakeParameterArray['itemFormElName'];
-                    if (isset($flexFormRowData[$flexFormFieldName][$lkey])) {
-                        $fakeParameterArray['itemFormElValue'] = $flexFormRowData[$flexFormFieldName][$lkey];
-                    } else {
-                        $fakeParameterArray['itemFormElValue'] = $fakeParameterArray['fieldConf']['config']['default'];
-                    }
-
-                    $options = $this->data;
-                    $options['parameterArray'] = $fakeParameterArray;
-                    $options['elementBaseName'] = $this->data['elementBaseName'] . $flexFormFormPrefix . '[' . $flexFormFieldName . '][' . $lkey . ']';
-
-                    if (!empty($flexFormFieldArray['config']['renderType'])) {
-                        $options['renderType'] = $flexFormFieldArray['config']['renderType'];
-                    } else {
-                        // Fallback to type if no renderType is given
-                        $options['renderType'] = $flexFormFieldArray['config']['type'];
-                    }
-                    $childResult = $this->nodeFactory->create($options)->render();
-
-                    $theTitle = htmlspecialchars($fakeParameterArray['fieldConf']['label']);
-                    $defInfo = array();
-
-                    // Possible line breaks in the label through xml: \n => <br/>, usage of nl2br() not possible, so it's done through str_replace (?!)
-                    $processedTitle = str_replace('\\n', '<br />', $theTitle);
-                    // @todo: Similar to the processing within SingleElementContainer ... use it from there?!
-                    $html[] = '<div class="form-group t3js-formengine-palette-field t3js-formengine-validation-marker">';
-                    $html[] = '<label class="t3js-formengine-label">';
-                    if (is_array($metaData) && isset($metaData['langChildren']) && $metaData['langChildren']) {
-                        // Find language uid of this iso code
-                        $languageUid = 0;
-                        $lKeyWithoutV = substr($lkey, 1);
-                        if ($lKeyWithoutV !== 'DEF') {
-                            foreach ($this->data['systemLanguageRows'] as $systemLanguageRow) {
-                                if ($systemLanguageRow['iso'] === $lKeyWithoutV) {
-                                    $languageUid = $systemLanguageRow['uid'];
-                                    break;
-                                }
-                            }
-                        }
-                        $languageIcon = $iconFactory->getIcon($this->data['systemLanguageRows'][$languageUid]['flagIconIdentifier'], Icon::SIZE_SMALL)->render();
-                        $html[] = $languageIcon;
-                    }
-                    $html[] = BackendUtility::wrapInHelp($parameterArray['_cshKey'], $flexFormFieldName, $processedTitle);
-                    $html[] = '</label>';
-                    $html[] = '<div class="t3js-formengine-field-item">';
-                    $html[] = $childResult['html'];
-                    $html[] = implode(LF, $defInfo);
-                    $html[] = $this->renderVDEFDiff($flexFormRowData[$flexFormFieldName], $lkey);
-                    $html[] = '</div>';
-                    $html[] = '</div>';
-                }
-
-                if (!empty($html)) {
-                    $resultArray['html'] .= '<div class="form-section">' . implode(LF, $html) . '</div>';
-                }
-                $childResult['html'] = '';
-                $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $childResult);
-            }
-        }
-
-        return $resultArray;
-    }
-
-    /**
-     * Renders the diff-view of vDEF fields in flex forms
-     *
-     * @param array $vArray Record array of the record being edited
-     * @param string $vDEFkey HTML of the form field. This is what we add the content to.
-     * @return string Item string returned again, possibly with the original value added to.
-     */
-    protected function renderVDEFDiff($vArray, $vDEFkey)
-    {
-        $item = null;
-        if (
-            $GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase'] && isset($vArray[$vDEFkey . '.vDEFbase'])
-            && (string)$vArray[$vDEFkey . '.vDEFbase'] !== (string)$vArray['vDEF'][0]
-        ) {
-            // Create diff-result:
-            $diffUtility = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\DiffUtility::class);
-            $diffres = $diffUtility->makeDiffDisplay($vArray[$vDEFkey . '.vDEFbase'], $vArray['vDEF']);
-            $item = '<div class="typo3-TCEforms-diffBox">' . '<div class="typo3-TCEforms-diffBox-header">'
-                . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:compatibility6/Resources/Private/Language/locallang.xlf:labels.changeInOrig')) . ':</div>' . $diffres . '</div>';
-        }
-        return $item;
-    }
-
-    /**
-     * @return LanguageService
-     */
-    protected function getLanguageService()
-    {
-        return $GLOBALS['LANG'];
-    }
-
-    /**
-     * @return BackendUserAuthentication
-     */
-    protected function getBackendUserAuthentication()
-    {
-        return $GLOBALS['BE_USER'];
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Form/Container/FlexFormEntryContainer.php b/typo3/sysext/compatibility6/Classes/Form/Container/FlexFormEntryContainer.php
deleted file mode 100644 (file)
index bce0619..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Form\Container;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Backend\Form\Container\AbstractContainer;
-use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Entry container to a flex form element. This container is created by
- * SingleFieldContainer if a type='flex' field is rendered.
- *
- * It either forks a FlexFormTabsContainer or a FlexFormNoTabsContainer.
- *
- * This container additionally handles flex form languages on sheet level.
- */
-class FlexFormEntryContainer extends AbstractContainer
-{
-    /**
-     * Entry method
-     *
-     * @return array As defined in initializeResultArray() of AbstractNode
-     */
-    public function render()
-    {
-        $flexFormDataStructureArray = $this->data['parameterArray']['fieldConf']['config']['ds'];
-        $flexFormRowData = $this->data['parameterArray']['itemFormElValue'];
-
-        /** @var IconFactory $iconFactory */
-        $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-
-        // Tabs or no tabs - that's the question
-        $hasTabs = false;
-        if (count($flexFormDataStructureArray['sheets']) > 1) {
-            $hasTabs = true;
-        }
-
-        $resultArray = $this->initializeResultArray();
-
-        foreach ($flexFormDataStructureArray['meta']['languagesOnSheetLevel'] as $lKey) {
-            // Add language as header
-            if (!$flexFormDataStructureArray['meta']['langChildren'] && !$flexFormDataStructureArray['meta']['langDisable']) {
-                // Find language uid of this iso code
-                $languageUid = 0;
-                if ($lKey !== 'DEF') {
-                    foreach ($this->data['systemLanguageRows'] as $systemLanguageRow) {
-                        if ($systemLanguageRow['iso'] === $lKey) {
-                            $languageUid = $systemLanguageRow['uid'];
-                            break;
-                        }
-                    }
-                }
-                $resultArray['html'] .= LF
-                    . '<strong>'
-                    . $iconFactory->getIcon($this->data['systemLanguageRows'][$languageUid]['flagIconIdentifier'], Icon::SIZE_SMALL)->render()
-                    . htmlspecialchars($this->data['systemLanguageRows'][$languageUid]['title'])
-                    . '</strong>';
-            }
-
-            // Default language "lDEF", other options are "lUK" or whatever country code
-            $flexFormCurrentLanguage = 'l' . $lKey;
-
-            $options = $this->data;
-            $options['flexFormCurrentLanguage'] = $flexFormCurrentLanguage;
-            $options['flexFormDataStructureArray'] = $flexFormDataStructureArray;
-            $options['flexFormRowData'] = $flexFormRowData;
-            if (!$hasTabs) {
-                $options['renderType'] = 'flexFormNoTabsContainer';
-                $flexFormNoTabsResult = $this->nodeFactory->create($options)->render();
-                $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $flexFormNoTabsResult);
-            } else {
-                $options['renderType'] = 'flexFormTabsContainer';
-                $flexFormTabsContainerResult = $this->nodeFactory->create($options)->render();
-                $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $flexFormTabsContainerResult);
-            }
-        }
-        $resultArray['requireJsModules'][] = 'TYPO3/CMS/Backend/FormEngineFlexForm';
-
-        return $resultArray;
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Form/Container/FlexFormNoTabsContainer.php b/typo3/sysext/compatibility6/Classes/Form/Container/FlexFormNoTabsContainer.php
deleted file mode 100644 (file)
index 71aed98..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Form\Container;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Backend\Form\Container\AbstractContainer;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Handle a flex form that has no tabs.
- *
- * This container is called by FlexFormEntryContainer if only a default sheet
- * exists. It evaluates the display condition and hands over rendering of single
- * fields to FlexFormElementContainer.
- */
-class FlexFormNoTabsContainer extends AbstractContainer
-{
-    /**
-     * Entry method
-     *
-     * @return array As defined in initializeResultArray() of AbstractNode
-     */
-    public function render()
-    {
-        $table = $this->data['tableName'];
-        $row = $this->data['databaseRow'];
-        $fieldName = $this->data['fieldName']; // field name of the flex form field in DB
-        $parameterArray = $this->data['parameterArray'];
-        $flexFormDataStructureArray = $this->data['flexFormDataStructureArray'];
-        $flexFormCurrentLanguage = $this->data['flexFormCurrentLanguage'];
-        $flexFormRowData = $this->data['flexFormRowData'];
-        $resultArray = $this->initializeResultArray();
-
-        // Flex ds was normalized in flex provider to always have a sheet.
-        // Determine this single sheet name, most often it ends up with sDEF, except if only one sheet was defined
-        $sheetName = array_pop(array_keys($flexFormDataStructureArray['sheets']));
-        $flexFormRowDataSubPart = $flexFormRowData['data'][$sheetName][$flexFormCurrentLanguage];
-
-        // That was taken from GeneralUtility::resolveSheetDefInDS - no idea if it is important
-        unset($flexFormDataStructureArray['meta']);
-
-        if (!is_array($flexFormDataStructureArray['sheets'][$sheetName]['ROOT']['el'])) {
-            $resultArray['html'] = 'Data Structure ERROR: No [\'ROOT\'][\'el\'] element found in flex form definition.';
-            return $resultArray;
-        }
-
-        // Assemble key for loading the correct CSH file
-        // @todo: what is that good for? That is for the title of single elements ... see FlexFormElementContainer!
-        $dsPointerFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['columns'][$fieldName]['config']['ds_pointerField'], true);
-        $parameterArray['_cshKey'] = $table . '.' . $fieldName;
-        foreach ($dsPointerFields as $key) {
-            if ((string)$row[$key] !== '') {
-                $parameterArray['_cshKey'] .= '.' . $row[$key];
-            }
-        }
-
-        $options = $this->data;
-        $options['flexFormDataStructureArray'] = $flexFormDataStructureArray['sheets'][$sheetName]['ROOT']['el'];
-        $options['flexFormRowData'] = $flexFormRowDataSubPart;
-        $options['flexFormFormPrefix'] = '[data][' . $sheetName . '][' . $flexFormCurrentLanguage . ']';
-        $options['parameterArray'] = $parameterArray;
-
-        $options['renderType'] = 'flexFormElementContainer';
-        return $this->nodeFactory->create($options)->render();
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Form/Container/FlexFormTabsContainer.php b/typo3/sysext/compatibility6/Classes/Form/Container/FlexFormTabsContainer.php
deleted file mode 100644 (file)
index b7d342b..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Form\Container;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Backend\Form\Container\AbstractContainer;
-use TYPO3\CMS\Backend\Template\DocumentTemplate;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Lang\LanguageService;
-
-/**
- * Handle flex forms that have tabs (multiple "sheets").
- *
- * This container is called by FlexFormEntryContainer. It resolves each
- * sheet and hands rendering of single sheet content over to FlexFormElementContainer.
- */
-class FlexFormTabsContainer extends AbstractContainer
-{
-    /**
-     * Entry method
-     *
-     * @return array As defined in initializeResultArray() of AbstractNode
-     */
-    public function render()
-    {
-        $languageService = $this->getLanguageService();
-
-        $table = $this->data['tableName'];
-        $row = $this->data['databaseRow'];
-        $fieldName = $this->data['fieldName']; // field name of the flex form field in DB
-        $parameterArray = $this->data['parameterArray'];
-        $flexFormDataStructureArray = $this->data['flexFormDataStructureArray'];
-        $flexFormCurrentLanguage = $this->data['flexFormCurrentLanguage'];
-        $flexFormRowData = $this->data['flexFormRowData'];
-
-        $resultArray = $this->initializeResultArray();
-        $resultArray['requireJsModules'][] = 'TYPO3/CMS/Backend/Tabs';
-
-        $domIdPrefix = 'DTM-' . GeneralUtility::shortMD5($this->data['parameterArray']['itemFormElName'] . $flexFormCurrentLanguage);
-        $tabCounter = 0;
-        $tabElements = array();
-        foreach ($flexFormDataStructureArray['sheets'] as $sheetName => $sheetDataStructure) {
-            $flexFormRowSheetDataSubPart = $flexFormRowData['data'][$sheetName][$flexFormCurrentLanguage];
-
-            if (!is_array($sheetDataStructure['ROOT']['el'])) {
-                $resultArray['html'] .= LF . 'No Data Structure ERROR: No [\'ROOT\'][\'el\'] found for sheet "' . $sheetName . '".';
-                continue;
-            }
-
-            $tabCounter ++;
-
-            // Assemble key for loading the correct CSH file
-            // @todo: what is that good for? That is for the title of single elements ... see FlexFormElementContainer!
-            $dsPointerFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['columns'][$fieldName]['config']['ds_pointerField'], true);
-            $parameterArray['_cshKey'] = $table . '.' . $fieldName;
-            foreach ($dsPointerFields as $key) {
-                if ((string)$row[$key] !== '') {
-                    $parameterArray['_cshKey'] .= '.' . $row[$key];
-                }
-            }
-
-            $options = $this->data;
-            $options['flexFormDataStructureArray'] = $sheetDataStructure['ROOT']['el'];
-            $options['flexFormRowData'] = $flexFormRowSheetDataSubPart;
-            $options['flexFormFormPrefix'] = '[data][' . $sheetName . '][' . $flexFormCurrentLanguage . ']';
-            $options['parameterArray'] = $parameterArray;
-            // Merge elements of this tab into a single list again and hand over to
-            // palette and single field container to render this group
-            $options['tabAndInlineStack'][] = array(
-                'tab',
-                $domIdPrefix . '-' . $tabCounter,
-            );
-            $options['renderType'] = 'flexFormElementContainer';
-            $childReturn = $this->nodeFactory->create($options)->render();
-
-            $tabElements[] = array(
-                'label' => !empty($sheetDataStructure['ROOT']['sheetTitle']) ? $languageService->sL($sheetDataStructure['ROOT']['sheetTitle']) : $sheetName,
-                'content' => $childReturn['html'],
-                'description' => $sheetDataStructure['ROOT']['sheetDescription'] ? $languageService->sL($sheetDataStructure['ROOT']['sheetDescription']) : '',
-                'linkTitle' => $sheetDataStructure['ROOT']['sheetShortDescr'] ? $languageService->sL($sheetDataStructure['ROOT']['sheetShortDescr']) : '',
-            );
-
-            $childReturn['html'] = '';
-            $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $childReturn);
-        }
-
-        // Feed everything to document template for tab rendering
-        $resultArray['html'] = $this->renderTabMenu($tabElements, $domIdPrefix);
-        return $resultArray;
-    }
-
-    /**
-     * @return LanguageService
-     */
-    protected function getLanguageService()
-    {
-        return $GLOBALS['LANG'];
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php b/typo3/sysext/compatibility6/Classes/Form/FormDataProvider/TcaFlexProcess.php
deleted file mode 100644 (file)
index 3d462a1..0000000
+++ /dev/null
@@ -1,707 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Form\FormDataProvider;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Backend\Form\FormDataCompiler;
-use TYPO3\CMS\Backend\Form\FormDataGroup\FlexFormSegment;
-use TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider;
-use TYPO3\CMS\Backend\Form\FormDataProviderInterface;
-use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Process data structures and data values, calculate defaults.
- *
- * This is typically the last provider, executed after TcaFlexPrepare
- */
-class TcaFlexProcess implements FormDataProviderInterface
-{
-    /**
-     * Determine possible pageTsConfig overrides and apply them to ds.
-     * Determine available languages and sanitize dv for further processing. Then kick
-     * and validate further details like excluded fields. Finally for each possible
-     * value and ds call FormDataCompiler with set FlexFormSegment group to resolve
-     * single field stuff like item processor functions.
-     *
-     * @param array $result
-     * @return array
-     */
-    public function addData(array $result)
-    {
-        foreach ($result['processedTca']['columns'] as $fieldName => $fieldConfig) {
-            if (empty($fieldConfig['config']['type']) || $fieldConfig['config']['type'] !== 'flex') {
-                continue;
-            }
-
-            $flexIdentifier = $this->getFlexIdentifier($result, $fieldName);
-            $pageTsConfigOfFlex = $this->getPageTsOfFlex($result, $fieldName, $flexIdentifier);
-            $result = $this->modifyOuterDataStructure($result, $fieldName, $pageTsConfigOfFlex);
-            $result = $this->removeExcludeFieldsFromDataStructure($result, $fieldName, $flexIdentifier);
-            $result = $this->removeDisabledFieldsFromDataStructure($result, $fieldName, $pageTsConfigOfFlex);
-            $result = $this->prepareLanguageHandlingInDataValues($result, $fieldName);
-            $result = $this->modifyDataStructureAndDataValuesByFlexFormSegmentGroup($result, $fieldName, $pageTsConfigOfFlex);
-        }
-
-        return $result;
-    }
-
-    /**
-     * Take care of ds_pointerField and friends to determine the correct sub array within
-     * TCA config ds.
-     *
-     * Gets extension identifier. Use second pointer field if it's value is not empty, "list" or "*",
-     * else it must be a plugin and first one will be used.
-     * This code basically determines the sub key of ds field:
-     * config = array(
-     *  ds => array(
-     *    'aFlexConfig' => '<flexXml ...
-     *     ^^^^^^^^^^^
-     * $flexformIdentifier contains "aFlexConfig" after this operation.
-     *
-     * @todo: This method is only implemented half. It basically should do all the
-     * @todo: pointer handling that is done within BackendUtility::getFlexFormDS() to $srcPointer.
-     *
-     * @param array $result Result array
-     * @param string $fieldName Current handle field name
-     * @return string Pointer
-     */
-    protected function getFlexIdentifier(array $result, $fieldName)
-    {
-        // @todo: Current implementation with the "list_type, CType" fallback is rather limited and customized for
-        // @todo: tt_content, also it forces a ds_pointerField to be defined and a casual "default" sub array does not work
-        $pointerFields = !empty($result['processedTca']['columns'][$fieldName]['config']['ds_pointerField'])
-            ? $result['processedTca']['columns'][$fieldName]['config']['ds_pointerField']
-            : 'list_type,CType';
-        $pointerFields = GeneralUtility::trimExplode(',', $pointerFields);
-        $flexformIdentifier = !empty($result['databaseRow'][$pointerFields[0]]) ? $result['databaseRow'][$pointerFields[0]] : '';
-        if (!empty($result['databaseRow'][$pointerFields[1]])
-            && $result['databaseRow'][$pointerFields[1]] !== 'list'
-            && $result['databaseRow'][$pointerFields[1]] !== '*'
-        ) {
-            $flexformIdentifier = $result['databaseRow'][$pointerFields[1]];
-        }
-        if (empty($flexformIdentifier)) {
-            $flexformIdentifier = 'default';
-        }
-
-        return $flexformIdentifier;
-    }
-
-    /**
-     * Determine TCEFORM.aTable.aField.matchingIdentifier
-     *
-     * @param array $result Result array
-     * @param string $fieldName Handled field name
-     * @param string $flexIdentifier Determined identifier
-     * @return array PageTsConfig for this flex
-     */
-    protected function getPageTsOfFlex(array $result, $fieldName, $flexIdentifier)
-    {
-        $table = $result['tableName'];
-        $pageTs = [];
-        if (!empty($result['pageTsConfig']['TCEFORM.'][$table . '.'][$fieldName . '.'][$flexIdentifier . '.'])
-            && is_array($result['pageTsConfig']['TCEFORM.'][$table . '.'][$fieldName . '.'][$flexIdentifier . '.'])) {
-            $pageTs = $result['pageTsConfig']['TCEFORM.'][$table . '.'][$fieldName . '.'][$flexIdentifier . '.'];
-        }
-        return $pageTs;
-    }
-
-    /**
-     * Handle "outer" flex data structure changes like language and sheet
-     * description. Does not change "TCA" or values of single elements
-     *
-     * @param array $result Result array
-     * @param string $fieldName Current handle field name
-     * @param array $pageTsConfig Given pageTsConfig of this flex form
-     * @return array Modified item array
-     */
-    protected function modifyOuterDataStructure(array $result, $fieldName, $pageTsConfig)
-    {
-        $modifiedDataStructure = $result['processedTca']['columns'][$fieldName]['config']['ds'];
-
-        if (isset($pageTsConfig['langDisable'])) {
-            $modifiedDataStructure['meta']['langDisable'] = $pageTsConfig['langDisable'];
-        }
-        if (isset($pageTsConfig['langChildren'])) {
-            $modifiedDataStructure['meta']['langChildren'] = $pageTsConfig['langChildren'];
-        }
-
-        if (isset($modifiedDataStructure['sheets']) && is_array($modifiedDataStructure['sheets'])) {
-            // Handling multiple sheets
-            foreach ($modifiedDataStructure['sheets'] as $sheetName => $sheetStructure) {
-                if (isset($pageTsConfig[$sheetName . '.']) && is_array($pageTsConfig[$sheetName . '.'])) {
-                    $pageTsOfSheet = $pageTsConfig[$sheetName . '.'];
-
-                    // Remove whole sheet if disabled
-                    if (!empty($pageTsOfSheet['disabled'])) {
-                        unset($modifiedDataStructure['sheets'][$sheetName]);
-                        continue;
-                    }
-
-                    // sheetTitle, sheetDescription, sheetShortDescr
-                    $modifiedDataStructure['sheets'][$sheetName] = $this->modifySingleSheetInformation($sheetStructure, $pageTsOfSheet);
-                }
-            }
-        }
-
-        $modifiedDataStructure['meta']['langDisable'] = isset($modifiedDataStructure['meta']['langDisable'])
-            ? (bool)$modifiedDataStructure['meta']['langDisable']
-            : false;
-        $modifiedDataStructure['meta']['langChildren'] = isset($modifiedDataStructure['meta']['langChildren'])
-            ? (bool)$modifiedDataStructure['meta']['langChildren']
-            : false;
-
-        $result['processedTca']['columns'][$fieldName]['config']['ds'] = $modifiedDataStructure;
-
-        return $result;
-    }
-
-    /**
-     * Removes fields from data structure the user has no access to
-     *
-     * @param array $result Result array
-     * @param string $fieldName Current handle field name
-     * @param string $flexIdentifier Determined identifier
-     * @return array Modified result
-     */
-    protected function removeExcludeFieldsFromDataStructure(array $result, $fieldName, $flexIdentifier)
-    {
-        $dataStructure = $result['processedTca']['columns'][$fieldName]['config']['ds'];
-        $backendUser = $this->getBackendUser();
-        if ($backendUser->isAdmin() || !isset($dataStructure['sheets']) || !is_array($dataStructure['sheets'])) {
-            return $result;
-        }
-
-        $userNonExcludeFields = GeneralUtility::trimExplode(',', $backendUser->groupData['non_exclude_fields']);
-        $excludeFieldsPrefix = $result['tableName'] . ':' . $fieldName . ';' . $flexIdentifier . ';';
-        $nonExcludeFields = [];
-        foreach ($userNonExcludeFields as $userNonExcludeField) {
-            if (strpos($userNonExcludeField, $excludeFieldsPrefix) !== false) {
-                $exploded = explode(';', $userNonExcludeField);
-                $sheetName = $exploded[2];
-                $fieldName = $exploded[3];
-                $nonExcludeFields[$sheetName] = $fieldName;
-            }
-        }
-
-        foreach ($dataStructure['sheets'] as $sheetName => $sheetDefinition) {
-            if (!isset($sheetDefinition['ROOT']['el']) || !is_array($sheetDefinition['ROOT']['el'])) {
-                continue;
-            }
-            foreach ($sheetDefinition['ROOT']['el'] as $flexFieldName => $fieldDefinition) {
-                if (!empty($fieldDefinition['exclude']) && empty($nonExcludeFields[$sheetName])) {
-                    unset($result['processedTca']['columns'][$fieldName]['config']['ds']['sheets'][$sheetName]['ROOT']['el'][$flexFieldName]);
-                }
-            }
-        }
-
-        return $result;
-    }
-
-    /**
-     * Handle "outer" flex data structure changes like language and sheet
-     * description. Does not change "TCA" or values of single elements
-     *
-     * @param array $result Result array
-     * @param string $fieldName Current handle field name
-     * @param array $pageTsConfig Given pageTsConfig of this flex form
-     * @return array Modified item array
-     */
-    protected function removeDisabledFieldsFromDataStructure(array $result, $fieldName, $pageTsConfig)
-    {
-        $dataStructure = $result['processedTca']['columns'][$fieldName]['config']['ds'];
-        if (!isset($dataStructure['sheets']) || !is_array($dataStructure['sheets'])) {
-            return $result;
-        }
-        foreach ($dataStructure['sheets'] as $sheetName => $sheetDefinition) {
-            if (!isset($sheetDefinition['ROOT']['el']) || !is_array($sheetDefinition['ROOT']['el'])
-                || !isset($pageTsConfig[$sheetName . '.'])) {
-                continue;
-            }
-            foreach ($sheetDefinition['ROOT']['el'] as $flexFieldName => $fieldDefinition) {
-                if (!empty($pageTsConfig[$sheetName . '.'][$flexFieldName . '.']['disabled'])) {
-                    unset($result['processedTca']['columns'][$fieldName]['config']['ds']['sheets'][$sheetName]['ROOT']['el'][$flexFieldName]);
-                }
-            }
-        }
-
-        return $result;
-    }
-
-    /**
-     * Remove data values in languages the user has no access to and add dummy entries
-     * for languages that are available but do not exist in data values yet.
-     *
-     * @param array $result Result array
-     * @param string $fieldName Current handle field name
-     * @return array Modified item array
-     */
-    protected function prepareLanguageHandlingInDataValues(array $result, $fieldName)
-    {
-        $backendUser = $this->getBackendUser();
-        $dataStructure = $result['processedTca']['columns'][$fieldName]['config']['ds'];
-
-        $langDisabled = $dataStructure['meta']['langDisable'];
-        $langChildren = $dataStructure['meta']['langChildren'];
-
-        // Existing page language overlays are only considered if options.checkPageLanguageOverlay is set in userTs
-        $checkPageLanguageOverlay = false;
-        if (isset($result['userTsConfig']['options.']) && is_array($result['userTsConfig']['options.'])
-            && array_key_exists('checkPageLanguageOverlay', $result['userTsConfig']['options.'])
-        ) {
-            $checkPageLanguageOverlay = (bool)$result['userTsConfig']['options.']['checkPageLanguageOverlay'];
-        }
-
-        $systemLanguageRows = $result['systemLanguageRows'];
-
-        // Contains all language iso code that are valid and user has access to
-        $availableLanguageCodes = [];
-        $defaultCodeWasAdded = false;
-        foreach ($systemLanguageRows as $systemLanguageRow) {
-            $isoCode = $systemLanguageRow['iso'];
-            $isAvailable = true;
-            if ($langDisabled && $isoCode !== 'DEF') {
-                $isAvailable = false;
-            }
-            // @todo: Is it possible a user has no write access to default lang? If so, what to do?
-            if (!$backendUser->checkLanguageAccess($systemLanguageRow['uid'])) {
-                $isAvailable = false;
-            }
-            if ($checkPageLanguageOverlay && $systemLanguageRow['uid'] > 0) {
-                $found = false;
-                foreach ($result['pageLanguageOverlayRows'] as $overlayRow) {
-                    if ((int)$overlayRow['sys_language_uid'] === (int)$systemLanguageRow['uid']) {
-                        $found = true;
-                        break;
-                    }
-                }
-                if (!$found) {
-                    $isAvailable = false;
-                }
-            }
-            if ($isoCode === 'DEF' && $defaultCodeWasAdded) {
-                $isAvailable = false;
-            }
-            if ($isAvailable) {
-                $availableLanguageCodes[] = $isoCode;
-            }
-            if ($isoCode === 'DEF') {
-                $defaultCodeWasAdded = true;
-            }
-        }
-        // Set the list of available languages in the data structure "meta" section to have it
-        // available for the render engine to iterate over it.
-        $result['processedTca']['columns'][$fieldName]['config']['ds']['meta']['availableLanguageCodes'] = $availableLanguageCodes;
-
-        if (!$langChildren) {
-            $allowedLanguageSheetKeys = [];
-            foreach ($availableLanguageCodes as $isoCode) {
-                $allowedLanguageSheetKeys['l' . $isoCode] = [];
-            }
-            $result = $this->setLanguageSheetsInDataValues($result, $fieldName, $allowedLanguageSheetKeys);
-
-            // With $langChildren = 0, values must only contain vDEF prefixed keys
-            $allowedValueLevelLanguageKeys = [];
-            $allowedValueLevelLanguageKeys['vDEF'] = [];
-            $allowedValueLevelLanguageKeys['vDEF.vDEFbase'] = [];
-            // A richtext special
-            $allowedValueLevelLanguageKeys['_TRANSFORM_vDEF.vDEFbase'] = [];
-            $result = $this->setLanguageValueLevelValues($result, $fieldName, $allowedValueLevelLanguageKeys);
-        } else {
-            // langChildren is set - only lDEF as sheet language is allowed, but more fields on value field level
-            $allowedLanguageSheetKeys = [
-                'lDEF' => [],
-            ];
-            $result = $this->setLanguageSheetsInDataValues($result, $fieldName, $allowedLanguageSheetKeys);
-
-            $allowedValueLevelLanguageKeys = [];
-            foreach ($availableLanguageCodes as $isoCode) {
-                $allowedValueLevelLanguageKeys['v' . $isoCode] = [];
-                $allowedValueLevelLanguageKeys['v' . $isoCode . '.vDEFbase'] = [];
-                $allowedValueLevelLanguageKeys['_TRANSFORM_v' . $isoCode . '.vDEFbase'] = [];
-            }
-            $result = $this->setLanguageValueLevelValues($result, $fieldName, $allowedValueLevelLanguageKeys);
-        }
-
-        return $result;
-    }
-
-    /**
-     * Feed single flex field and data to FlexFormSegment FormData compiler and merge result.
-     * This one is nasty. Goal is to have processed TCA stuff in DS and also have validated / processed data values.
-     *
-     * Three main parts in this method:
-     * * Process values of existing section container for default values
-     * * Process values and TCA of possible section container and create a default value row for each
-     * * Process TCA of "normal" fields and have default values in data ['templateRows']['containerName'] parallel to section ['el']
-     *
-     * @param array $result Result array
-     * @param string $fieldName Current handle field name
-     * @param array $pageTsConfig Given pageTsConfig of this flex form
-     * @return array Modified item array
-     */
-    protected function modifyDataStructureAndDataValuesByFlexFormSegmentGroup(array $result, $fieldName, $pageTsConfig)
-    {
-        $dataStructure = $result['processedTca']['columns'][$fieldName]['config']['ds'];
-        $dataValues = $result['databaseRow'][$fieldName];
-        $tableName = $result['tableName'];
-
-        $availableLanguageCodes = $result['processedTca']['columns'][$fieldName]['config']['ds']['meta']['availableLanguageCodes'];
-        if ($dataStructure['meta']['langChildren']) {
-            $languagesOnSheetLevel = [ 'DEF' ];
-            $languagesOnElementLevel = $availableLanguageCodes;
-        } else {
-            $languagesOnSheetLevel = $availableLanguageCodes;
-            $languagesOnElementLevel = [ 'DEF' ];
-        }
-
-        $result['processedTca']['columns'][$fieldName]['config']['ds']['meta']['languagesOnSheetLevel'] = $languagesOnSheetLevel;
-        $result['processedTca']['columns'][$fieldName]['config']['ds']['meta']['languagesOnElement'] = $languagesOnElementLevel;
-
-        if (!isset($dataStructure['sheets']) || !is_array($dataStructure['sheets'])) {
-            return $result;
-        }
-
-        /** @var FlexFormSegment $formDataGroup */
-        $formDataGroup = GeneralUtility::makeInstance(FlexFormSegment::class);
-        /** @var FormDataCompiler $formDataCompiler */
-        $formDataCompiler = GeneralUtility::makeInstance(FormDataCompiler::class, $formDataGroup);
-
-        foreach ($dataStructure['sheets'] as $dataStructureSheetName => $dataStructureSheetDefinition) {
-            if (!isset($dataStructureSheetDefinition['ROOT']['el']) || !is_array($dataStructureSheetDefinition['ROOT']['el'])) {
-                continue;
-            }
-            $dataStructureSheetElements = $dataStructureSheetDefinition['ROOT']['el'];
-
-            // Prepare pageTsConfig of this sheet
-            $pageTsConfig['TCEFORM.'][$tableName . '.'] = [];
-            if (isset($pageTsConfig[$dataStructureSheetName . '.']) && is_array($pageTsConfig[$dataStructureSheetName . '.'])) {
-                $pageTsConfig['TCEFORM.'][$tableName . '.'] = $pageTsConfig[$dataStructureSheetName . '.'];
-            }
-
-            foreach ($languagesOnSheetLevel as $isoSheetLevel) {
-                $langSheetLevel = 'l' . $isoSheetLevel;
-                foreach ($dataStructureSheetElements as $dataStructureSheetElementName => $dataStructureSheetElementDefinition) {
-                    if (isset($dataStructureSheetElementDefinition['type']) && $dataStructureSheetElementDefinition['type'] === 'array'
-                        && isset($dataStructureSheetElementDefinition['section']) && $dataStructureSheetElementDefinition['section'] === '1'
-                    ) {
-                        // A section
-
-                        // Existing section container elements
-                        if (isset($dataValues['data'][$dataStructureSheetName][$langSheetLevel][$dataStructureSheetElementName]['el'])
-                            && is_array($dataValues['data'][$dataStructureSheetName][$langSheetLevel][$dataStructureSheetElementName]['el'])
-                        ) {
-                            $containerArray = $dataValues['data'][$dataStructureSheetName][$langSheetLevel][$dataStructureSheetElementName]['el'];
-                            foreach ($containerArray as $aContainerNumber => $aContainerArray) {
-                                if (is_array($aContainerArray)) {
-                                    foreach ($aContainerArray as $aContainerName => $aContainerElementArray) {
-                                        if ($aContainerName === '_TOGGLE') {
-                                            // Don't handle internal toggle state field
-                                            continue;
-                                        }
-                                        if (!isset($dataStructureSheetElements[$dataStructureSheetElementName]['el'][$aContainerName])) {
-                                            // Container not defined in ds
-                                            continue;
-                                        }
-                                        foreach ($dataStructureSheetElements[$dataStructureSheetElementName]['el'][$aContainerName]['el'] as $singleFieldName => $singleFieldConfiguration) {
-                                            // $singleFieldValueArray = ['data']['sSections']['lDEF']['section_1']['el']['1']['container_1']['el']['element_1']
-                                            $singleFieldValueArray = [];
-                                            if (isset($aContainerElementArray['el'][$singleFieldName])
-                                                && is_array($aContainerElementArray['el'][$singleFieldName])
-                                            ) {
-                                                $singleFieldValueArray = $aContainerElementArray['el'][$singleFieldName];
-                                            }
-                                            foreach ($languagesOnElementLevel as $isoElementLevel) {
-                                                $langElementLevel = 'v' . $isoElementLevel;
-                                                $valueArray = [
-                                                    'uid' => $result['databaseRow']['uid'],
-                                                ];
-                                                $command = 'new';
-                                                if (array_key_exists($langElementLevel, $singleFieldValueArray)) {
-                                                    $command = 'edit';
-                                                    $valueArray[$singleFieldName] = $singleFieldValueArray[$langElementLevel];
-                                                }
-                                                $inputToFlexFormSegment = [
-                                                    'tableName' => $result['tableName'],
-                                                    'command' => $command,
-                                                    // It is currently not possible to have pageTsConfig for section container
-                                                    'pageTsConfig' => [],
-                                                    'databaseRow' => $valueArray,
-                                                    'processedTca' => [
-                                                        'ctrl' => [],
-                                                        'columns' => [
-                                                            $singleFieldName => $singleFieldConfiguration,
-                                                        ],
-                                                    ],
-                                                ];
-                                                $flexSegmentResult = $formDataCompiler->compile($inputToFlexFormSegment);
-                                                // Set data value result
-                                                if (array_key_exists($singleFieldName, $flexSegmentResult['databaseRow'])) {
-                                                    $result['databaseRow'][$fieldName]
-                                                    ['data'][$dataStructureSheetName][$langSheetLevel][$dataStructureSheetElementName]['el']
-                                                    [$aContainerNumber][$aContainerName]['el']
-                                                    [$singleFieldName][$langElementLevel]
-                                                        = $flexSegmentResult['databaseRow'][$singleFieldName];
-                                                }
-                                                // Set TCA structure result, actually, this call *might* be obsolete since the "dummy"
-                                                // handling below will set it again.
-                                                $result['processedTca']['columns'][$fieldName]['config']['ds']
-                                                ['sheets'][$dataStructureSheetName]['ROOT']['el'][$dataStructureSheetElementName]['el']
-                                                [$aContainerName]['el'][$singleFieldName]
-                                                    = $flexSegmentResult['processedTca']['columns'][$singleFieldName];
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-                        } // End of existing data value handling
-
-                        // Prepare "fresh" row for every possible container
-                        if (isset($dataStructureSheetElements[$dataStructureSheetElementName]['el']) && is_array($dataStructureSheetElements[$dataStructureSheetElementName]['el'])) {
-                            foreach ($dataStructureSheetElements[$dataStructureSheetElementName]['el'] as $possibleContainerName => $possibleContainerConfiguration) {
-                                if (isset($possibleContainerConfiguration['el']) && is_array($possibleContainerConfiguration['el'])) {
-                                    // Initialize result data array templateRows
-                                    $result['databaseRow'][$fieldName]
-                                    ['data'][$dataStructureSheetName][$langSheetLevel][$dataStructureSheetElementName]['templateRows']
-                                    [$possibleContainerName]['el']
-                                        = [];
-                                    foreach ($possibleContainerConfiguration['el'] as $singleFieldName => $singleFieldConfiguration) {
-                                        foreach ($languagesOnElementLevel as $isoElementLevel) {
-                                            $langElementLevel = 'v' . $isoElementLevel;
-                                            $inputToFlexFormSegment = [
-                                                'tableName' => $result['tableName'],
-                                                'command' => 'new',
-                                                'pageTsConfig' => [],
-                                                'databaseRow' => [
-                                                    'uid' => $result['databaseRow']['uid'],
-                                                ],
-                                                'processedTca' => [
-                                                    'ctrl' => [],
-                                                    'columns' => [
-                                                        $singleFieldName => $singleFieldConfiguration,
-                                                    ],
-                                                ],
-                                            ];
-                                            $flexSegmentResult = $formDataCompiler->compile($inputToFlexFormSegment);
-                                            if (array_key_exists($singleFieldName, $flexSegmentResult['databaseRow'])) {
-                                                $result['databaseRow'][$fieldName]
-                                                ['data'][$dataStructureSheetName][$langSheetLevel][$dataStructureSheetElementName]['templateRows']
-                                                [$possibleContainerName]['el'][$singleFieldName][$langElementLevel]
-                                                 = $flexSegmentResult['databaseRow'][$singleFieldName];
-                                            }
-                                            $result['processedTca']['columns'][$fieldName]['config']['ds']
-                                            ['sheets'][$dataStructureSheetName]['ROOT']['el'][$dataStructureSheetElementName]['el']
-                                            [$possibleContainerName]['el'][$singleFieldName]
-                                                = $flexSegmentResult['processedTca']['columns'][$singleFieldName];
-                                        }
-                                    }
-                                }
-                            }
-                        } // End of preparation for each possible container
-
-                    // type without section is not ok
-                    } elseif (isset($dataStructureSheetElementDefinition['type']) || isset($dataStructureSheetElementDefinition['section'])) {
-                        throw new \UnexpectedValueException(
-                            'Broken data structure on field name ' . $fieldName . '. section without type or vice versa is not allowed',
-                            1440685208
-                        );
-
-                    // A "normal" TCA element
-                    } else {
-                        foreach ($languagesOnElementLevel as $isoElementLevel) {
-                            $langElementLevel = 'v' . $isoElementLevel;
-                            $valueArray = [
-                                // uid of "parent" is given down for inline elements to resolve correctly
-                                'uid' => $result['databaseRow']['uid'],
-                            ];
-                            $command = 'new';
-                            if (isset($dataValues['data'][$dataStructureSheetName][$langSheetLevel][$dataStructureSheetElementName])
-                                && array_key_exists($langElementLevel, $dataValues['data'][$dataStructureSheetName][$langSheetLevel][$dataStructureSheetElementName])
-                            ) {
-                                $command = 'edit';
-                                $valueArray[$dataStructureSheetElementName] = $dataValues['data'][$dataStructureSheetName][$langSheetLevel][$dataStructureSheetElementName][$langElementLevel];
-                            }
-                            $inputToFlexFormSegment = [
-                                // tablename of "parent" is given down for inline elements to resolve correctly
-                                'tableName' => $result['tableName'],
-                                'command' => $command,
-                                'pageTsConfig' => $pageTsConfig,
-                                'databaseRow' => $valueArray,
-                                'processedTca' => [
-                                    'ctrl' => [],
-                                    'columns' => [
-                                        $dataStructureSheetElementName => $dataStructureSheetElementDefinition,
-                                    ],
-                                ],
-                            ];
-                            $flexSegmentResult = $formDataCompiler->compile($inputToFlexFormSegment);
-                            // Set data value result
-                            if (array_key_exists($dataStructureSheetElementName, $flexSegmentResult['databaseRow'])) {
-                                $result['databaseRow'][$fieldName]
-                                ['data'][$dataStructureSheetName][$langSheetLevel][$dataStructureSheetElementName][$langElementLevel]
-                                    = $flexSegmentResult['databaseRow'][$dataStructureSheetElementName];
-                            }
-                            // Set TCA structure result
-                            $result['processedTca']['columns'][$fieldName]['config']['ds']
-                            ['sheets'][$dataStructureSheetName]['ROOT']['el'][$dataStructureSheetElementName]
-                                = $flexSegmentResult['processedTca']['columns'][$dataStructureSheetElementName];
-                        }
-                    } // End of single element handling
-                }
-            }
-        }
-
-        return $result;
-    }
-
-    /**
-     * Modify data structure of a single "sheet"
-     * Sets "secondary" data like sheet names and so on, but does NOT modify single elements
-     *
-     * @param array $dataStructure Given data structure
-     * @param array $pageTsOfSheet Page Ts config of given field
-     * @return array Modified data structure
-     */
-    protected function modifySingleSheetInformation(array $dataStructure, array $pageTsOfSheet)
-    {
-        // Return if no elements defined
-        if (!isset($dataStructure['ROOT']['el']) || !is_array($dataStructure['ROOT']['el'])) {
-            return $dataStructure;
-        }
-
-        // Rename sheet (tab)
-        if (!empty($pageTsOfSheet['sheetTitle'])) {
-            $dataStructure['ROOT']['sheetTitle'] = $pageTsOfSheet['sheetTitle'];
-        }
-        // Set sheet description (tab)
-        if (!empty($pageTsOfSheet['sheetDescription'])) {
-            $dataStructure['ROOT']['sheetDescription'] = $pageTsOfSheet['sheetDescription'];
-        }
-        // Set sheet short description (tab)
-        if (!empty($pageTsOfSheet['sheetShortDescr'])) {
-            $dataStructure['ROOT']['sheetShortDescr'] = $pageTsOfSheet['sheetShortDescr'];
-        }
-
-        return $dataStructure;
-    }
-
-    /**
-     * Add new sheet languages not yet in data values and remove invalid ones
-     *
-     * databaseRow['aFlex']['data']['sDEF'] = array('lDEF', 'lNotAllowed');
-     * allowedLanguageKeys = array('lDEF', 'lNEW')
-     * -> databaseRow['aFlex']['data']['sDEF'] = array('lDEF', 'lNEW');
-     *
-     * @param array $result Result array
-     * @param string $fieldName Current handle field name
-     * @param array $allowedKeys List of allowed keys
-     * @return array Modified result
-     */
-    protected function setLanguageSheetsInDataValues(array $result, $fieldName, array $allowedKeys)
-    {
-        $valueArray = [];
-        if (isset($result['databaseRow'][$fieldName]['data']) && is_array($result['databaseRow'][$fieldName]['data'])) {
-            $valueArray = $result['databaseRow'][$fieldName]['data'];
-        }
-        foreach ($valueArray as $sheetName => $sheetLanguages) {
-            // Add iso code with empty array if it does not yet exist in data
-            // and remove codes from data that do not exist in $allowed
-            $result['databaseRow'][$fieldName]['data'][$sheetName]
-                = array_intersect_key(array_merge($allowedKeys, $sheetLanguages), $allowedKeys);
-        }
-        return $result;
-    }
-
-    /**
-     * Remove invalid keys from data value array the user has no access to
-     * or that were removed or similar to prevent any rendering of this stuff
-     *
-     * Handles this for "normal" fields and also for section container element values.
-     *
-     * @param array $result Result array
-     * @param string $fieldName Current handle field name
-     * @param array $allowedKeys List of allowed keys
-     * @return array Modified result
-     */
-    protected function setLanguageValueLevelValues(array $result, $fieldName, $allowedKeys)
-    {
-        $valueArray = [];
-        if (isset($result['databaseRow'][$fieldName]['data']) && is_array($result['databaseRow'][$fieldName]['data'])) {
-            $valueArray = $result['databaseRow'][$fieldName]['data'];
-        }
-        foreach ($valueArray as $sheetName => $sheetLanguages) {
-            if (!is_array($sheetLanguages)) {
-                continue;
-            }
-            foreach ($sheetLanguages as $languageName => $languageFields) {
-                if (!is_array($languageFields)) {
-                    continue;
-                }
-                foreach ($languageFields as $flexFieldName => $fieldValues) {
-                    if (!is_array($fieldValues)) {
-                        continue;
-                    }
-                    $allowedSingleValues = [];
-                    foreach ($fieldValues as $fieldValueName => $fieldValueValue) {
-                        if (is_array($fieldValueValue) && $fieldValueName === 'el') {
-                            // A section container
-                            foreach ($fieldValueValue as $sectionNumber => $sectionElementArray) {
-                                if (is_array($sectionElementArray)) {
-                                    $allowedSingleValues['el'][$sectionNumber] = [];
-                                    foreach ($sectionElementArray as $sectionElementName => $containerElementArray) {
-                                        if (isset($containerElementArray['el']) && is_array($containerElementArray['el']) && !empty($containerElementArray['el'])) {
-                                            foreach ($containerElementArray['el'] as $aContainerElementName => $aContainerElementValues) {
-                                                if (is_array($aContainerElementValues)) {
-                                                    foreach ($aContainerElementValues as $aContainerElementValueKey => $aContainerElementValueValue) {
-                                                        if (array_key_exists($aContainerElementValueKey, $allowedKeys)) {
-                                                            $allowedSingleValues['el'][$sectionNumber][$sectionElementName]
-                                                            ['el'][$aContainerElementName][$aContainerElementValueKey] = $aContainerElementValueValue;
-                                                        }
-                                                    }
-                                                } else {
-                                                    $allowedSingleValues['el'][$sectionNumber][$sectionElementName]['el']
-                                                    [$aContainerElementName] = $aContainerElementValues;
-                                                }
-                                            }
-                                        } else {
-                                            $allowedSingleValues['el'][$sectionNumber][$sectionElementName] = $containerElementArray;
-                                        }
-                                    }
-                                } else {
-                                    $allowedSingleValues = $sectionElementArray;
-                                }
-                            }
-                        } else {
-                            // "normal" value field
-                            if (array_key_exists($fieldValueName, $allowedKeys)) {
-                                $allowedSingleValues[$fieldValueName] = $fieldValueValue;
-                            }
-                        }
-                    }
-                    $result['databaseRow'][$fieldName]['data'][$sheetName][$languageName][$flexFieldName] = $allowedSingleValues;
-                }
-            }
-        }
-        return $result;
-    }
-
-    /**
-     * @return BackendUserAuthentication
-     */
-    protected function getBackendUser()
-    {
-        return $GLOBALS['BE_USER'];
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Hooks/ExtTablesPostProcessing/TcaMigration.php b/typo3/sysext/compatibility6/Classes/Hooks/ExtTablesPostProcessing/TcaMigration.php
deleted file mode 100644 (file)
index 31014ed..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Hooks\ExtTablesPostProcessing;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Database\TableConfigurationPostProcessingHookInterface;
-use TYPO3\Cms\Core\Utility\GeneralUtility;
-
-/**
- * Migrate TCA that was added by extensions in ext_tables.php
- *
- * This is deprecated, all extensions should register / manipulate TCA in Configuration/TCA nowadays.
- */
-class TcaMigration implements TableConfigurationPostProcessingHookInterface
-{
-    /**
-     * Run migration dynamically a second time on *every* request.
-     * This can not be cached and is slow.
-     *
-     * @return void
-     */
-    public function processData()
-    {
-        /** @var \TYPO3\CMS\Core\Migrations\TcaMigration $tcaMigration */
-        $tcaMigration = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Migrations\TcaMigration::class);
-        $GLOBALS['TCA'] = $tcaMigration->migrate($GLOBALS['TCA']);
-        $messages = $tcaMigration->getMessages();
-        if (!empty($messages)) {
-            $context = 'ext:compatibility6 did an automatic migration of TCA during bootstrap. This costs performance on every'
-                . ' call. It also means some old extensions register TCA in ext_tables.php and not in Configuration/TCA.'
-                . ' Please adapt TCA accordingly until this message is not thrown anymore and unload extension compatibility6'
-                . ' as soon as possible';
-            array_unshift($messages, $context);
-            GeneralUtility::deprecationLog(implode(LF, $messages));
-        }
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Hooks/PageLayoutView/MailformPreviewRenderer.php b/typo3/sysext/compatibility6/Classes/Hooks/PageLayoutView/MailformPreviewRenderer.php
deleted file mode 100644 (file)
index 50f6492..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Hooks\PageLayoutView;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Contains a preview rendering for the page module of
- * CType="mailform"
- */
-class MailformPreviewRenderer implements \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface
-{
-    /**
-     * Preprocesses the preview rendering of a content element of type "mailform"
-     *
-     * @param \TYPO3\CMS\Backend\View\PageLayoutView $parentObject Calling parent object
-     * @param bool $drawItem Whether to draw the item using the default functionality
-     * @param string $headerContent Header content
-     * @param string $itemContent Item content
-     * @param array $row Record row of tt_content
-     *
-     * @return void
-     */
-    public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
-    {
-        if ($row['CType'] === 'mailform') {
-            $itemContent = $parentObject->linkEditContent($parentObject->renderText($row['bodytext']), $row) . '<br />';
-            $drawItem = false;
-        }
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Hooks/PageLayoutView/ScriptPreviewRenderer.php b/typo3/sysext/compatibility6/Classes/Hooks/PageLayoutView/ScriptPreviewRenderer.php
deleted file mode 100644 (file)
index 18a3a2f..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Hooks\PageLayoutView;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface;
-use TYPO3\CMS\Lang\LanguageService;
-use TYPO3\CMS\Backend\View\PageLayoutView;
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-
-/**
- * Contains a preview rendering for the page module of CType="script"
- */
-class ScriptPreviewRenderer implements PageLayoutViewDrawItemHookInterface
-{
-    /**
-     * Preprocesses the preview rendering of a content element of type "script"
-     *
-     * @param \TYPO3\CMS\Backend\View\PageLayoutView $parentObject Calling parent object
-     * @param bool $drawItem Whether to draw the item using the default functionality
-     * @param string $headerContent Header content
-     * @param string $itemContent Item content
-     * @param array $row Record row of tt_content
-     *
-     * @return void
-     */
-    public function preProcess(
-        PageLayoutView &$parentObject,
-        &$drawItem,
-        &$headerContent,
-        &$itemContent,
-        array &$row
-    ) {
-        if ($row['CType'] === 'script') {
-            $itemContent .= $this->getLanguageService()->sL(
-                BackendUtility::getItemLabel('tt_content', 'select_key'),
-                true
-            ) . ' ' . $row['select_key'] . '<br />';
-            $itemContent .= '<br />' . $parentObject->linkEditContent(
-                $parentObject->renderText($row['bodytext']),
-                $row
-            ) . '<br />';
-            $itemContent .= '<br />' . $parentObject->linkEditContent(
-                $parentObject->renderText($row['imagecaption']),
-                $row
-            ) . '<br />';
-
-            $drawItem = false;
-        }
-    }
-
-    /**
-     * Returns the language service
-     * @return LanguageService
-     */
-    protected function getLanguageService()
-    {
-        return $GLOBALS['LANG'];
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Hooks/TypoScriptFrontendController/ContentPostProcHook.php b/typo3/sysext/compatibility6/Classes/Hooks/TypoScriptFrontendController/ContentPostProcHook.php
deleted file mode 100644 (file)
index 3a6be9b..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Hooks\TypoScriptFrontendController;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Html\HtmlParser;
-
-/**
- * Class that hooks into TypoScriptFrontendController to do XHTML cleaning and prefixLocalAnchors functionality
- */
-class ContentPostProcHook
-{
-    /**
-     * @var \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
-     */
-    protected $pObj;
-
-    /**
-     * XHTML-clean the code, if flag config.xhtml_cleaning is set
-     * to "all", same goes for config.prefixLocalAnchors
-     *
-     * @param array $parameters
-     * @param \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $parentObject
-     */
-    public function contentPostProcAll(&$parameters, $parentObject)
-    {
-        $this->pObj = $parentObject;
-        // Fix local anchors in links, if flag set
-        if ($this->doLocalAnchorFix() === 'all') {
-            $GLOBALS['TT']->push('Local anchor fix, all', '');
-            $this->prefixLocalAnchorsWithScript();
-            $GLOBALS['TT']->pull();
-        }
-        // XHTML-clean the code, if flag set
-        if ($this->doXHTML_cleaning() === 'all') {
-            $GLOBALS['TT']->push('XHTML clean, all', '');
-            $XHTML_clean = GeneralUtility::makeInstance(HtmlParser::class);
-            $this->pObj->content = $XHTML_clean->XHTML_clean($this->pObj->content);
-            $GLOBALS['TT']->pull();
-        }
-    }
-
-    /**
-     * XHTML-clean the code, if flag config.xhtml_cleaning is set
-     * to "cached", same goes for config.prefixLocalAnchors
-     *
-     * @param array $parameters
-     * @param \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $parentObject
-     */
-    public function contentPostProcCached(&$parameters, $parentObject)
-    {
-        $this->pObj = $parentObject;
-        // Fix local anchors in links, if flag set
-        if ($this->doLocalAnchorFix() === 'cached') {
-            $GLOBALS['TT']->push('Local anchor fix, cached', '');
-            $this->prefixLocalAnchorsWithScript();
-            $GLOBALS['TT']->pull();
-        }
-        // XHTML-clean the code, if flag set
-        if ($this->doXHTML_cleaning() === 'cached') {
-            $GLOBALS['TT']->push('XHTML clean, cached', '');
-            $XHTML_clean = GeneralUtility::makeInstance(HtmlParser::class);
-            $this->pObj->content = $XHTML_clean->XHTML_clean($this->pObj->content);
-            $GLOBALS['TT']->pull();
-        }
-    }
-
-    /**
-     * XHTML-clean the code, if flag config.xhtml_cleaning is set
-     * to "output", same goes for config.prefixLocalAnchors
-     *
-     * @param array $parameters
-     * @param \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $parentObject
-     */
-    public function contentPostProcOutput(&$parameters, $parentObject)
-    {
-        $this->pObj = $parentObject;
-        // Fix local anchors in links, if flag set
-        if ($this->doLocalAnchorFix() === 'output') {
-            $GLOBALS['TT']->push('Local anchor fix, output', '');
-            $this->prefixLocalAnchorsWithScript();
-            $GLOBALS['TT']->pull();
-        }
-        // XHTML-clean the code, if flag set
-        if ($this->doXHTML_cleaning() === 'output') {
-            $GLOBALS['TT']->push('XHTML clean, output', '');
-            $XHTML_clean = GeneralUtility::makeInstance(HtmlParser::class);
-            $this->pObj->content = $XHTML_clean->XHTML_clean($this->pObj->content);
-            $GLOBALS['TT']->pull();
-        }
-    }
-
-    /**
-     * Returns the mode of XHTML cleaning
-     *
-     * @return string Keyword: "all", "cached", "none" or "output"
-     */
-    protected function doXHTML_cleaning()
-    {
-        if ($this->pObj->config['config']['xmlprologue'] === 'none') {
-            return 'none';
-        }
-        return $this->pObj->config['config']['xhtml_cleaning'];
-    }
-
-
-    /**
-     * Returns the mode of Local Anchor prefixing
-     *
-     * @return string Keyword: "all", "cached" or "output"
-     */
-    public function doLocalAnchorFix()
-    {
-        return isset($this->pObj->config['config']['prefixLocalAnchors']) ? $this->pObj->config['config']['prefixLocalAnchors'] : null;
-    }
-
-    /**
-     * Substitutes all occurrences of <a href="#"... in $this->content with <a href="[path-to-url]#"...
-     *
-     * @return void Works directly on $this->content
-     */
-    protected function prefixLocalAnchorsWithScript()
-    {
-        if (!$this->pObj->beUserLogin) {
-            if (!is_object($this->pObj->cObj)) {
-                $this->pObj->newCObj();
-            }
-            $scriptPath = $this->pObj->cObj->getUrlToCurrentLocation();
-        } else {
-            // To break less existing sites, we allow the REQUEST_URI to be used for the prefix
-            $scriptPath = GeneralUtility::getIndpEnv('REQUEST_URI');
-            // Disable the cache so that these URI will not be the ones to be cached
-            $this->pObj->no_cache = true;
-        }
-        $originalContent = $this->pObj->content;
-        $this->pObj->content = preg_replace('/(<(?:a|area).*?href=")(#[^"]*")/i', '${1}' . htmlspecialchars($scriptPath) . '${2}', $originalContent);
-        // There was an error in the call to preg_replace, so keep the original content (behavior prior to PHP 5.2)
-        if (preg_last_error() > 0) {
-            GeneralUtility::sysLog('preg_replace returned error-code: ' . preg_last_error() . ' in function prefixLocalAnchorsWithScript. Replacement not done!', 'cms', GeneralUtility::SYSLOG_SEVERITY_FATAL);
-            $this->pObj->content = $originalContent;
-        }
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Template/FrontendDocumentTemplate.php b/typo3/sysext/compatibility6/Classes/Template/FrontendDocumentTemplate.php
deleted file mode 100644 (file)
index 73c0668..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Template;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Page\PageRenderer;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Extension class for "template" - used in the context of frontend editing.
- */
-class FrontendDocumentTemplate extends \TYPO3\CMS\Backend\Template\DocumentTemplate
-{
-    /**
-     * Gets instance of PageRenderer
-     *
-     * @return PageRenderer
-     * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8
-     */
-    public function getPageRenderer()
-    {
-        GeneralUtility::logDeprecatedFunction();
-        if (!isset($this->pageRenderer)) {
-            $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
-        }
-        return $this->pageRenderer;
-    }
-
-    /**
-     * Used in the frontend context to insert header data via TSFE->additionalHeaderData.
-     * Mimics header inclusion from template->startPage().
-     *
-     * @return void
-     */
-    public function insertHeaderData()
-    {
-        $this->backPath = ($GLOBALS['TSFE']->backPath = TYPO3_mainDir);
-        $this->pageRenderer->setBackPath($this->backPath);
-        $this->docStyle();
-        // Add applied JS/CSS to $GLOBALS['TSFE']
-        if ($this->JScode) {
-            $this->pageRenderer->addHeaderData($this->JScode);
-        }
-        if (!empty($this->JScodeArray)) {
-            foreach ($this->JScodeArray as $name => $code) {
-                $this->pageRenderer->addJsInlineCode($name, $code, false);
-            }
-        }
-    }
-}
diff --git a/typo3/sysext/compatibility6/Classes/Utility/FormUtility.php b/typo3/sysext/compatibility6/Classes/Utility/FormUtility.php
deleted file mode 100644 (file)
index a764c45..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-namespace TYPO3\CMS\Compatibility6\Utility;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Contains some functions that were been previously found
- * inside TypoScriptFrontendController
- * but are shared between FormContentObject and TypoScriptFrontendController
- *
- */
-class FormUtility
-{
-    /**
-     * En/decodes strings with lightweight encryption and a hash containing the server encryptionKey (salt)
-     * Can be used for authentication of information sent from server generated pages back to the server to establish that the server generated the page. (Like hidden fields with recipient mail addresses)
-     * Encryption is mainly to avoid spam-bots to pick up information.
-     *
-     * @param string $string Input string to en/decode
-     * @param bool $decode If set, string is decoded, not encoded.
-     * @return string encoded/decoded version of $string
-     */
-    public static function codeString($string, $decode = false)
-    {
-        if ($decode) {
-            list($md5Hash, $str) = explode(':', $string, 2);
-            $newHash = substr(md5($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] . ':' . $str), 0, 10);
-            if ($md5Hash === $newHash) {
-                $str = base64_decode($str);
-                $str = self::roundTripCryptString($str);
-                return $str;
-            } else {
-                return false;
-            }
-        } else {
-            $str = $string;
-            $str = self::roundTripCryptString($str);
-            $str = base64_encode($str);
-            $newHash = substr(md5($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] . ':' . $str), 0, 10);
-            return $newHash . ':' . $str;
-        }
-    }
-
-    /**
-     * Encrypts a strings by XOR'ing all characters with a key derived from the
-     * TYPO3 encryption key.
-     *
-     * Using XOR means that the string can be decrypted by simply calling the
-     * function again - just like rot-13 works (but in this case for ANY byte
-     * value).
-     *
-     * @param string $string String to crypt, may be empty
-     * @return string binary crypt string, will have the same length as $string
-     */
-    protected static function roundTripCryptString($string)
-    {
-        $out = '';
-        $cleartextLength = strlen($string);
-        $key = sha1($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
-        $keyLength = strlen($key);
-        for ($a = 0; $a < $cleartextLength; $a++) {
-            $xorVal = ord($key[$a % $keyLength]);
-            $out .= chr(ord($string[$a]) ^ $xorVal);
-        }
-        return $out;
-    }
-}
diff --git a/typo3/sysext/compatibility6/Configuration/Backend/Routes.php b/typo3/sysext/compatibility6/Configuration/Backend/Routes.php
deleted file mode 100644 (file)
index e37b603..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-/**
- * Definitions of routes
- */
-return [
-    // Register wizard
-    'wizard_forms' => [
-        'path' => '/wizard/forms',
-        'target' => \TYPO3\CMS\Compatibility6\Controller\Wizard\FormsController::class . '::mainAction'
-    ]
-];
diff --git a/typo3/sysext/compatibility6/Configuration/TCA/Overrides/pages.php b/typo3/sysext/compatibility6/Configuration/TCA/Overrides/pages.php
deleted file mode 100644 (file)
index 31b56ba..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-defined('TYPO3_MODE') or die();
-
-// Add "pages.storage_pid" field to TCA column
-$additionalColumns = array(
-    'storage_pid' => array(
-        'exclude' => 1,
-        'label' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang.xlf:storage_pid',
-        'config' => array(
-            'type' => 'group',
-            'internal_type' => 'db',
-            'allowed' => 'pages',
-            'size' => '1',
-            'maxitems' => '1',
-            'minitems' => '0',
-            'show_thumbs' => '1',
-            'wizards' => array(
-                'suggest' => array(
-                    'type' => 'suggest'
-                )
-            )
-        )
-    )
-);
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $additionalColumns);
-
-// Add palette
-$GLOBALS['TCA']['pages']['palettes']['storage'] = array(
-    'showitem' => 'storage_pid;LLL:EXT:compatibility6/Resources/Private/Language/locallang.xlf:pages.storage_pid_formlabel',
-    'canNotCollapse' => 1
-);
-
-// Add to "normal" pages, "external URL", "shortcut page" and "storage PID"
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages',
-    '--palette--;LLL:EXT:compatibility6/Resources/Private/Language/locallang.xlf:pages.palettes.storage;storage',
-    \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_DEFAULT . ','
-    . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK . ','
-    . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SHORTCUT . ','
-    . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SYSFOLDER,
-    'after:media'
-);
diff --git a/typo3/sysext/compatibility6/Configuration/TCA/Overrides/tt_content.php b/typo3/sysext/compatibility6/Configuration/TCA/Overrides/tt_content.php
deleted file mode 100644 (file)
index 128e6f3..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-<?php
-defined('TYPO3_MODE') or die();
-
-//Extra fields for the tt_content table
-$extraContentColumns = array(
-    'altText' => array(
-        'exclude' => true,
-        'label' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_altText',
-        'config' => array(
-            'type' => 'text',
-            'cols' => '30',
-            'rows' => '3'
-        )
-    ),
-    'imagecaption' => array(
-        'label' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang.xlf:LGL.caption',
-        'config' => array(
-            'type' => 'text',
-            'cols' => '30',
-            'rows' => '3',
-            'softref' => 'typolink_tag,images,email[subst],url'
-        )
-    ),
-    'imagecaption_position' => array(
-        'exclude' => true,
-        'label' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:imagecaption_position',
-        'config' => array(
-            'type' => 'select',
-            'renderType' => 'selectSingle',
-            'items' => array(
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang.xlf:LGL.default_value',
-                    ''
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:imagecaption_position.I.1',
-                    'center'
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:imagecaption_position.I.2',
-                    'right'
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:imagecaption_position.I.3',
-                    'left'
-                )
-            ),
-            'default' => ''
-        )
-    ),
-    'image_link' => array(
-        'exclude' => true,
-        'label' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_link',
-        'config' => array(
-            'type' => 'text',
-            'cols' => '30',
-            'rows' => '3',
-            'wizards' => array(
-                'link' => array(
-                    'type' => 'popup',
-                    'title' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_link_formlabel',
-                    'icon' => 'EXT:compatibility6/Resources/Public/Images/wizard_link.gif',
-                    'module' => array(
-                        'name' => 'wizard_link',
-                    ),
-                    'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1'
-                )
-            ),
-            'softref' => 'typolink[linkList]'
-        )
-    ),
-    'image_frames' => array(
-        'exclude' => true,
-        'label' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_frames',
-        'config' => array(
-            'type' => 'select',
-            'renderType' => 'selectSingle',
-            'items' => array(
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_frames.I.0',
-                    0
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_frames.I.1',
-                    1
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_frames.I.2',
-                    2
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_frames.I.3',
-                    3
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_frames.I.4',
-                    4
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_frames.I.5',
-                    5
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_frames.I.6',
-                    6
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_frames.I.7',
-                    7
-                ),
-                array(
-                    'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_frames.I.8',
-                    8
-                )
-            )
-        )
-    ),
-    'longdescURL' => array(
-        'exclude' => true,
-        'label' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_longdescURL',
-        'config' => array(
-            'type' => 'text',
-            'cols' => '30',
-            'rows' => '3',
-            'wizards' => array(
-                'link' => array(
-                    'type' => 'popup',
-                    'title' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_link_formlabel',
-                    'icon' => 'EXT:compatibility6/Resources/Public/Images/wizard_link.gif',
-                    'module' => array(
-                        'name' => 'wizard_link',
-                    ),
-                    'params' => array(
-                        'blindLinkOptions' => 'folder,file,mail,spec',
-                        'blindLinkFields' => 'target,title,class,params'
-                    ),
-                    'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1'
-                )
-            ),
-            'softref' => 'typolink[linkList]'
-        )
-    ),
-    'titleText' => array(
-        'exclude' => true,
-        'label' => 'LLL:EXT:compatibility6/Resources/Private/Language/locallang_ttc.xlf:image_titleText',
-        'config' => array(
-          &nb