[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)
committerJigal van Hemert <jigal@xs4all.nl>
Sat, 13 Oct 2012 17:23:05 +0000 (19:23 +0200)
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: If21e87086af17d310ca33ef4205b8c07220ad564
Fixes: #31943
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/13923
Tested-by: Steffen Ritter
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/sysext/setup/mod/index.php

index 8555ea0..f2e97fb 100755 (executable)
@@ -737,7 +737,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 */
@@ -1006,4 +1008,4 @@ $LANG->includeLLFile('EXT:setup/mod/locallang.xml');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
-?>
\ No newline at end of file
+?>