[BUGFIX] User settings don't remember that default language is selected
authorJigal van Hemert <jigal@xs4all.nl>
Sat, 19 Nov 2011 14:34:40 +0000 (15:34 +0100)
committerSusanne Moog <typo3@susannemoog.de>
Fri, 20 Jan 2012 21:04:37 +0000 (22:04 +0100)
If the default language is stored as the BE language it should be pre-selected
in the language selector in the User settings.

Change-Id: Id9ed524ba7b28da433a1d7f8712ead58d7b5e60b
Fixes: #31943
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/6748
Reviewed-by: Markus Klein
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Tested-by: Markus Klein
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
typo3/sysext/setup/mod/index.php

index 5eaee8e..ac17682 100755 (executable)
@@ -740,7 +740,9 @@ class SC_mod_user_setup_index {
 
                        // compile the languages dropdown
                $langDefault = $GLOBALS['LANG']->getLL('lang_default', 1);
-               $languageOptions[$langDefault] = '<option value="">' . $langDefault . '</option>';
+               $languageOptions[$langDefault] = '<option value=""' .
+                       ($GLOBALS['BE_USER']->uc['lang'] === '' ? ' selected="selected"' : '') .
+                       '>' . $langDefault . '</option>';
 
                        // traverse the number of languages
                /** @var $locales t3lib_l10n_Locales */
@@ -1009,4 +1011,4 @@ $LANG->includeLLFile('EXT:setup/mod/locallang.xml');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
-?>
\ No newline at end of file
+?>