[TASK] Add possibility to register a module as navigation 76/32676/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Thu, 5 Jun 2014 15:00:18 +0000 (17:00 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 9 Sep 2014 11:08:52 +0000 (13:08 +0200)
While implementing CSRF protection for backend modules,
it was forgotten to implement a solution for navigation components
that also could be modules.

Add this possibility now by introducing yet another
configuration option for modules.

Resolves: #58138
Documentation: #59369
Releases: 6.3, 6.2
Change-Id: I6655ad11cbf8a13c7d1182c9635cf2745183fb49
Reviewed-on: http://review.typo3.org/32676
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/View/ModuleMenuView.php

index b271e9a..d1a0c84 100644 (file)
@@ -232,6 +232,16 @@ class ModuleMenuView {
                                        $submoduleIcon = $this->getModuleIcon($submoduleKey);
                                        $submoduleDescription = $GLOBALS['LANG']->moduleLabels['labels'][$submoduleKey . 'label'];
                                        $originalLink = $submoduleLink;
+                                       if (isset($submoduleData['navigationFrameModule'])) {
+                                               $navigationFrameScript = BackendUtility::getModuleUrl(
+                                                       $submoduleData['navigationFrameModule'],
+                                                       isset($submoduleData['navigationFrameModuleParameters'])
+                                                               ? $submoduleData['navigationFrameModuleParameters']
+                                                               : array()
+                                               );
+                                       } else {
+                                               $navigationFrameScript = $submoduleData['navFrameScript'];
+                                       }
                                        $modules[$moduleKey]['subitems'][$submoduleKey] = array(
                                                'name' => $moduleName . '_' . $submoduleName,
                                                'title' => $GLOBALS['LANG']->moduleLabels['tabs'][$submoduleKey],
@@ -240,7 +250,7 @@ class ModuleMenuView {
                                                'link' => $submoduleLink,
                                                'originalLink' => $originalLink,
                                                'description' => $submoduleDescription,
-                                               'navigationFrameScript' => $submoduleData['navFrameScript'],
+                                               'navigationFrameScript' => $navigationFrameScript,
                                                'navigationFrameScriptParam' => $submoduleData['navFrameScriptParam'],
                                                'navigationComponentId' => $submoduleData['navigationComponentId']
                                        );