[TASK] Move BackendController addInlineSettings calls to _construct 13/54413/3
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Tue, 17 Oct 2017 08:59:21 +0000 (10:59 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 17 Oct 2017 09:05:30 +0000 (11:05 +0200)
Move calls to addInlineSettings out of the foreach loop, and place them
together with other similar calls.

Resolves: #82781
Releases: master
Change-Id: Ia2269833f7649559a1552a9290773984bebcc102
Reviewed-on: https://review.typo3.org/54413
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Classes/Controller/BackendController.php

index 411eb4d..e60d373 100644 (file)
@@ -163,6 +163,11 @@ class BackendController
         $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DebugConsole');
 
         $this->pageRenderer->addInlineSetting('ShowItem', 'moduleUrl', BackendUtility::getModuleUrl('show_item'));
+        $this->pageRenderer->addInlineSetting('RecordHistory', 'moduleUrl', BackendUtility::getModuleUrl('record_history'));
+        $this->pageRenderer->addInlineSetting('NewRecord', 'moduleUrl', BackendUtility::getModuleUrl('db_new'));
+        $this->pageRenderer->addInlineSetting('FormEngine', 'moduleUrl', BackendUtility::getModuleUrl('record_edit'));
+        $this->pageRenderer->addInlineSetting('RecordCommit', 'moduleUrl', BackendUtility::getModuleUrl('tce_db'));
+        $this->pageRenderer->addInlineSetting('WebLayout', 'moduleUrl', BackendUtility::getModuleUrl('web_layout'));
 
         $this->css = '';
 
@@ -432,11 +437,6 @@ class BackendController
             foreach ($jsFiles as $jsFile) {
                 $this->pageRenderer->addJsFile($relativeComponentPath . 'javascript/' . $jsFile);
             }
-            $this->pageRenderer->addInlineSetting('RecordHistory', 'moduleUrl', BackendUtility::getModuleUrl('record_history'));
-            $this->pageRenderer->addInlineSetting('NewRecord', 'moduleUrl', BackendUtility::getModuleUrl('db_new'));
-            $this->pageRenderer->addInlineSetting('FormEngine', 'moduleUrl', BackendUtility::getModuleUrl('record_edit'));
-            $this->pageRenderer->addInlineSetting('RecordCommit', 'moduleUrl', BackendUtility::getModuleUrl('tce_db'));
-            $this->pageRenderer->addInlineSetting('WebLayout', 'moduleUrl', BackendUtility::getModuleUrl('web_layout'));
         }
     }