mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX wrong session getter in choose_site_lang() (was setting boolean rather than $lang-value)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43759 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d85bf0b73e
commit
95ea169907
@ -112,29 +112,28 @@ class Translatable extends DataObjectDecorator {
|
||||
self::set_reading_lang($_GET['lang']);
|
||||
} elseif(isset($_COOKIE['lang']) && in_array(strtolower($_COOKIE['lang']),$langsAvailable)) {
|
||||
self::set_reading_lang($_COOKIE['lang']);
|
||||
} else if($lang = Session::get('currentLang') && in_array(strtolower($lang),$langsAvailable)) {
|
||||
self::set_reading_lang($lang);
|
||||
} else if(Session::get('currentLang')
|
||||
&& in_array(strtolower(Session::get('currentLang')),$langsAvailable)
|
||||
) {
|
||||
self::set_reading_lang(Session::get('currentLang'));
|
||||
} else if (($member = Member::currentUser()) && ($lang = $member->Locale)
|
||||
&& in_array(strtolower($lang),$langsAvailable)
|
||||
) {
|
||||
self::set_reading_lang($lang);
|
||||
} else {
|
||||
self::set_reading_lang(self::default_lang());
|
||||
}
|
||||
} else {
|
||||
if(isset($_GET['lang'])) {
|
||||
self::set_reading_lang($_GET['lang']);
|
||||
} elseif(isset($_COOKIE['lang'])) {
|
||||
self::set_reading_lang($_COOKIE['lang']);
|
||||
} else if($lang = Session::get('currentLang')) {
|
||||
self::set_reading_lang($lang);
|
||||
} else if(Session::get('currentLang')) {
|
||||
self::set_reading_lang(Session::get('currentLang'));
|
||||
} else if (($member = Member::currentUser()) && ($lang = $member->Locale)) {
|
||||
self::set_reading_lang($lang);
|
||||
} else {
|
||||
self::set_reading_lang(self::default_lang());
|
||||
}
|
||||
}
|
||||
self::$language_decided = true;
|
||||
|
||||
return self::$reading_lang;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user