Commit 19f4a436 authored by Benni Mack's avatar Benni Mack Committed by Christian Kuhn
Browse files

[BUGFIX] Remove legacy foreign_selector conversion

During TYPO3 v7 the FormEngine got rewritten, and a "todo"
was left, which can be removed as it now contains wrong
information as this information has been processed already
in a prior FormEngine DataProvider.

It is removed because the array implode implodes a
array of arrays building $record[$foreign_selector] (e.g. FAL)
into $record[$foreign_selector] = 'Array'; which was never
used within the InlineReordContainer anymore.

Resolves: #94177
Releases: master
Change-Id: I0d31c640271f6aeb45477557deba3985789e81bf
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69218

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 2f2b1a0e
......@@ -112,17 +112,6 @@ class InlineRecordContainer extends AbstractContainer
$resultArray['inlineData'] = $this->inlineData;
// If there is a selector field, normalize it:
if (!empty($inlineConfig['foreign_selector'])) {
$foreign_selector = $inlineConfig['foreign_selector'];
$valueToNormalize = $record[$foreign_selector];
if (is_array($record[$foreign_selector])) {
// @todo: this can be kicked again if always prepared rows are handled here
$valueToNormalize = implode(',', $record[$foreign_selector]);
}
$record[$foreign_selector] = $this->normalizeUid($valueToNormalize);
}
// Get the current naming scheme for DOM name/id attributes:
$appendFormFieldNames = '[' . $foreignTable . '][' . $record['uid'] . ']';
$objectId = $domObjectId . '-' . $foreignTable . '-' . $record['uid'];
......@@ -643,18 +632,6 @@ class InlineRecordContainer extends AbstractContainer
return $out;
}
/**
* Normalize a relation "uid" published by transferData, like "1|Company%201"
*
* @param string $string A transferData reference string, containing the uid
* @return string The normalized uid
*/
protected function normalizeUid($string)
{
$parts = explode('|', $string);
return $parts[0];
}
/**
* Initialized the hook objects for this class.
* Each hook object has to implement the interface
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment