mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
60831: Merged V4.2-BUG-FIX (4.2.2) to HEAD-BUG-FIX (Cloud/4.3) 60750: Merged DEV to V4.2-BUG-FIX (4.2.1) 60659: MNT-10145: JSF: Inconsistent browser behaviour when setting <language-select> to false - Some jsp pages were updated to set locale for the current user context. Also, getLanguage() methods were modified to take into account useInterfaceLanguage flag. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62367 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -759,6 +759,7 @@ public class Application
|
||||
*/
|
||||
public static Locale getLanguage(FacesContext fc)
|
||||
{
|
||||
boolean useInterfaceLanguage = Application.getClientConfig(fc).isLanguageSelect();
|
||||
Map sessionMap = fc.getExternalContext().getSessionMap();
|
||||
Boolean useSessionLocale = (Boolean)sessionMap.get(USE_SESSION_LOCALE);
|
||||
if (useSessionLocale == null)
|
||||
@@ -767,9 +768,9 @@ public class Application
|
||||
sessionMap.put(USE_SESSION_LOCALE, useSessionLocale);
|
||||
}
|
||||
Locale locale = (Locale)sessionMap.get(LOCALE);
|
||||
if (locale == null)
|
||||
if (locale == null || (!locale.equals(I18NUtil.getLocale()) && !useInterfaceLanguage))
|
||||
{
|
||||
if (useSessionLocale)
|
||||
if (useSessionLocale && useInterfaceLanguage)
|
||||
{
|
||||
// first check saved user preferences
|
||||
String strLocale = null;
|
||||
@@ -834,9 +835,9 @@ public class Application
|
||||
session.setAttribute(USE_SESSION_LOCALE, useSessionLocale);
|
||||
}
|
||||
Locale locale = (Locale)session.getAttribute(LOCALE);
|
||||
if (locale == null)
|
||||
if (locale == null || (!locale.equals(I18NUtil.getLocale()) && !useInterfaceLanguage))
|
||||
{
|
||||
if (useSessionLocale)
|
||||
if (useSessionLocale && useInterfaceLanguage)
|
||||
{
|
||||
// first check saved user preferences
|
||||
String strLocale = null;
|
||||
|
Reference in New Issue
Block a user