Revert "[BUGFIX] IRRE creates new records when using foreign_selector" 26/26726/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Thu, 9 Jan 2014 17:33:10 +0000 (18:33 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Thu, 9 Jan 2014 17:34:25 +0000 (18:34 +0100)
This reverts commit 692bd22c0875fd37e876c79cb4a1738c67873c11

The patch breaks IRRE. It is impossible to add images.

Change-Id: Iac9f0a7af3cc8532a953ac1947f6877ded4f915f
Resolves: #43239
Releases: 6.2
Reviewed-on: https://review.typo3.org/26726
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/backend/Classes/Form/Element/InlineElement.php

index 5d1d7f6..07cc6d3 100644 (file)
@@ -1117,7 +1117,7 @@ class InlineElement {
                // Put the current level also to the dynNestedStack of TCEforms:
                $this->fObj->pushToDynNestedStack('inline', $this->inlineNames['object']);
                // Dynamically create a new record using \TYPO3\CMS\Backend\Form\DataPreprocessor
-               if (!$foreignUid || !MathUtility::canBeInterpretedAsInteger($foreignUid)) {
+               if (!$foreignUid || !MathUtility::canBeInterpretedAsInteger($foreignUid) || $config['foreign_selector']) {
                        $record = $this->getNewRecord($this->inlineFirstPid, $current['table']);
                        // Set default values for new created records
                        if (isset($config['foreign_record_defaults']) && is_array($config['foreign_record_defaults'])) {