Commit bdf8eae2 authored by Christian Kuhn's avatar Christian Kuhn Committed by Frank Nägler
Browse files

[BUGFIX] Data merging in FormEngine

Data is merged in a wrong way and kills for instance
the required handling.

Resolves: #67470
Related: #67400
Releases: master
Change-Id: I0b78fb34b443be89663188b14db192b58804fc5b
Reviewed-on: http://review.typo3.org/40261


Reviewed-by: Jan Helke's avatarJan Helke <typo3@helke.de>
Tested-by: Jan Helke's avatarJan Helke <typo3@helke.de>
Reviewed-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
parent 57b9b409
......@@ -390,17 +390,17 @@ class FormEngine {
* @return void
*/
protected function mergeResult(array $resultArray) {
foreach ($resultArray['requiredElements'] as $element) {
$this->requiredElements[] = $element;
foreach ($resultArray['requiredElements'] as $name => $element) {
$this->requiredElements[$name] = $element;
}
foreach ($resultArray['requiredFields'] as $element) {
$this->requiredFields[] = $element;
foreach ($resultArray['requiredFields'] as $value => $name) {
$this->requiredFields[$value] = $name;
}
foreach ($resultArray['requiredAdditional'] as $element) {
$this->requiredAdditional[] = $element;
foreach ($resultArray['requiredAdditional'] as $name => $subArray) {
$this->requiredAdditional[$name] = $subArray;
}
foreach ($resultArray['requiredNested'] as $element) {
$this->requiredNested[] = $element;
foreach ($resultArray['requiredNested'] as $value => $name) {
$this->requiredNested[$value] = $name;
}
foreach ($resultArray['additionalJavaScriptPost'] as $element) {
$this->additionalJS_post[] = $element;
......@@ -408,7 +408,7 @@ class FormEngine {
foreach ($resultArray['additionalJavaScriptSubmit'] as $element) {
$this->additionalJS_submit[] = $element;
}
$this->extJSCODE = $this->extJSCODE . $resultArray['extJSCODE'];
$this->extJSCODE = $this->extJSCODE . LF . $resultArray['extJSCODE'];
$this->inlineData = $resultArray['inlineData'];
foreach ($resultArray['additionalHiddenFields'] as $element) {
$this->hiddenFieldAccum[] = $element;
......@@ -416,6 +416,13 @@ class FormEngine {
foreach ($resultArray['additionalHeadTags'] as $element) {
$this->additionalCode_pre[] = $element;
}
if (!empty($resultArray['inlineData'])) {
$resultArrayInlineData = $this->inlineData;
$resultInlineData = $resultArray['inlineData'];
ArrayUtility::mergeRecursiveWithOverrule($resultArrayInlineData, $resultInlineData);
$this->inlineData = $resultArrayInlineData;
}
}
/**
......
Supports Markdown
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