Skip to content
Snippets Groups Projects
Commit 9786bb98 authored by Florian Mast's avatar Florian Mast Committed by Susanne Moog
Browse files

[BUGFIX] Respect availableLanguages from AdditionalConfiguration.php

if $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages']
is set in AdditionalConfiguration.php, the language module will now 
respect that setting.

Resolves: #78876
Releases: master
Change-Id: Iec6a0f05db835ae949fbacdc2cdf500a0950d57c
Reviewed-on: https://review.typo3.org/50871


Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: default avatarSusanne Moog <susanne.moog@typo3.org>
parent b03406da
Branches
Tags
No related merge requests found
......@@ -85,11 +85,10 @@ class LanguageRepository
*/
public function __construct()
{
$configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
try {
$globalSettings = $configurationManager->getLocalConfigurationValueByPath($this->configurationPath);
$this->selectedLocales = (array)$globalSettings['availableLanguages'];
} catch (\Exception $e) {
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages'])) {
$this->selectedLocales = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages'];
} else {
$configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
$configurationManager->setLocalConfigurationValueByPath(
$this->configurationPath,
['availableLanguages' => []]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment