[TASK] Simplify module menu loading functionality 09/51209/2
authorBenni Mack <benni@typo3.org>
Mon, 9 Jan 2017 06:24:50 +0000 (07:24 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 9 Jan 2017 12:29:58 +0000 (13:29 +0100)
As there is no relative path functionality but only absolute
URLs (without the domain name but just prepended) the functionality
of stripping the siteUrl is removed, thus allowing to remove the hardcoded
"/typo3/" name in the URL and the siteUrl configuration option as well.

Resolves: #79212
Releases: master
Change-Id: I03a065950bb0401970a618bf30c71d69d6ed2188
Reviewed-on: https://review.typo3.org/51209
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Resources/Public/JavaScript/ModuleMenu.js
typo3/sysext/workspaces/Classes/Controller/PreviewController.php

index c4935cc..5adbfed 100644 (file)
@@ -580,7 +580,6 @@ class BackendController
             $pageModule = '';
         }
         $t3Configuration = [
-            'siteUrl' => GeneralUtility::getIndpEnv('TYPO3_SITE_URL'),
             'username' => htmlspecialchars($beUser->user['username']),
             'uniqueID' => GeneralUtility::shortMD5(uniqid('', true)),
             'pageModule' => $pageModule,
index d555d72..fe55879 100644 (file)
@@ -231,7 +231,7 @@ require(
 
                        openInNavFrame: function (url, params) {
                                var navUrl = url + (params ? (url.indexOf('?') !== -1 ? '&' : '?') + params : '');
-                               var currentUrl = this.relativeUrl(TYPO3.Backend.NavigationContainer.getUrl());
+                               var currentUrl = TYPO3.Backend.NavigationContainer.getUrl();
                                if (currentUrl !== navUrl) {
                                        TYPO3.Backend.NavigationContainer.refresh();
                                }
@@ -253,14 +253,6 @@ require(
                                $('#' + module).addClass('active');
                        },
 
-                       relativeUrl: function (url) {
-                               if (url) {
-                                       return url.replace(TYPO3.configuration.siteUrl + 'typo3/', '');
-                               } else {
-                                       return '';
-                               }
-                       },
-
                        // refresh the HTML by fetching the menu again
                        refreshMenu: function () {
                                $.ajax(TYPO3.settings.ajaxUrls['modulemenu']).done(function (result) {
index e713dde..a199d8f 100644 (file)
@@ -220,7 +220,6 @@ class PreviewController extends AbstractController
             $pageModule = '';
         }
         $t3Configuration = [
-            'siteUrl' => GeneralUtility::getIndpEnv('TYPO3_SITE_URL'),
             'username' => htmlspecialchars($backendUser->user['username']),
             'uniqueID' => GeneralUtility::shortMD5(uniqid('', true)),
             'pageModule' => $pageModule,