[BUGFIX] Use `modTSconfig` for default language label, if set 75/47375/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Wed, 23 Mar 2016 18:06:28 +0000 (19:06 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 23 Mar 2016 19:33:02 +0000 (20:33 +0100)
Due to a wrong assignment, modSharedTSconfig is always used
to set the default language label in PageLayoutController, even if
modTSconfig is set.

modTSconfig is now used if possible.

Resolves: #75242
Releases: master, 7.6, 6.2
Change-Id: I517c03f02ffc8d05ed74a865517ee775e1542bfe
Reviewed-on: https://review.typo3.org/47375
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Controller/PageLayoutController.php

index 63f5925..d6bd502 100644 (file)
@@ -323,7 +323,7 @@ class PageLayoutController {
                }
                // Setting alternative default label:
                if (($this->modSharedTSconfig['properties']['defaultLanguageLabel'] || $this->modTSconfig['properties']['defaultLanguageLabel']) && isset($this->MOD_MENU['language'][0])) {
-                       $this->MOD_MENU['language'][0] = $this->modTSconfig['properties']['defaultLanguageLabel'] ? $this->modSharedTSconfig['properties']['defaultLanguageLabel'] : $this->modSharedTSconfig['properties']['defaultLanguageLabel'];
+                       $this->MOD_MENU['language'][0] = $this->modTSconfig['properties']['defaultLanguageLabel'] ? $this->modTSconfig['properties']['defaultLanguageLabel'] : $this->modSharedTSconfig['properties']['defaultLanguageLabel'];
                }
                // Clean up settings
                $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name']);
@@ -1230,4 +1230,4 @@ class PageLayoutController {
                }
        }
 
-}
+}
\ No newline at end of file