[BUGFIX] Merge requireJsModules in IRRE 51/44151/4
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 19 Oct 2015 09:56:01 +0000 (11:56 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Mon, 19 Oct 2015 15:17:57 +0000 (17:17 +0200)
The $resultArray is built with mergeChildReturnIntoExistingResult but
the requireJsModules array is overridden at a later point, resulting in
loss of modules returned by the method mentioned before.

Both arrays are merged now to keep the returned requireJsModules.

Resolves: #70832
Releases: master
Change-Id: I6f0c02199b24f022f663916e3e8b8b5a12e8ef65
Reviewed-on: http://review.typo3.org/44151
Reviewed-by: Stephan Großberndt <stephan@grossberndt.de>
Reviewed-by: Benjamin Kott <info@bk2k.info>
Tested-by: Benjamin Kott <info@bk2k.info>
Reviewed-by: Sebastian Seidelmann <sebastian.seidelmann@gmail.com>
Tested-by: Sebastian Seidelmann <sebastian.seidelmann@gmail.com>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php

index ee38400..6687296 100644 (file)
@@ -14,9 +14,6 @@ namespace TYPO3\CMS\Backend\Form\Container;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Backend\Form\FormDataCompiler;
-use TYPO3\CMS\Backend\Form\FormDataGroup\OnTheFly;
-use TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectItems;
 use TYPO3\CMS\Backend\Form\NodeFactory;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Imaging\Icon;
@@ -27,8 +24,6 @@ use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Lang\LanguageService;
-use TYPO3\CMS\Core\Utility\ArrayUtility;
-use TYPO3\CMS\Backend\Form\Utility\FormEngineUtility;
 use TYPO3\CMS\Backend\Form\InlineStackProcessor;
 
 /**
@@ -307,7 +302,7 @@ class InlineControlContainer extends AbstractContainer
         if (count($sortableRecordUids) > 1 && $config['appearance']['useSortable']) {
             $resultArray['additionalJavaScriptPost'][] = 'inline.createDragAndDropSorting("' . $nameObject . '_records' . '");';
         }
-        $resultArray['requireJsModules'] = $this->requireJsModules;
+        $resultArray['requireJsModules'] = array_merge($resultArray['requireJsModules'], $this->requireJsModules);
 
         // Publish the uids of the child records in the given order to the browser
         $html .= '<input type="hidden" name="' . $nameForm . '" value="' . implode(',', $sortableRecordUids) . '" '