Author: mstruk
Date: 2010-09-02 05:22:53 -0400 (Thu, 02 Sep 2010)
New Revision: 4024
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/localization/LocalizationFilter.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/localization/LocalizationLifecycle.java
Log:
GTNPORTAL-1407: Language doesn't persist when session timeout
- fix broken with recent GTNPORTAL-1306 commits when cookie support was disabled
GTNPORTAL-1306: PortletRequest's locale to return user's preference language
instead of the locale from Accept-Language header
- reenabled cookies
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/localization/LocalizationFilter.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/localization/LocalizationFilter.java 2010-09-01
21:17:15 UTC (rev 4023)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/localization/LocalizationFilter.java 2010-09-02
09:22:53 UTC (rev 4024)
@@ -136,7 +136,7 @@
localeCtx.setSupportedLocales(supportedLocales);
localeCtx.setBrowserLocales(Collections.list(request.getLocales()));
- //localeCtx.setCookieLocales(LocalizationLifecycle.getCookieLocales(req));
+ localeCtx.setCookieLocales(LocalizationLifecycle.getCookieLocales(req));
localeCtx.setSessionLocale(LocalizationLifecycle.getSessionLocale(req));
localeCtx.setUserProfileLocale(getUserProfileLocale(container,
req.getRemoteUser()));
localeCtx.setRemoteUser(req.getRemoteUser());
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/localization/LocalizationLifecycle.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/localization/LocalizationLifecycle.java 2010-09-01
21:17:15 UTC (rev 4023)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/localization/LocalizationLifecycle.java 2010-09-02
09:22:53 UTC (rev 4024)
@@ -123,7 +123,7 @@
HttpServletRequest request = HttpServletRequest.class.cast(context.getRequest());
localeCtx.setBrowserLocales(Collections.list(request.getLocales()));
- //localeCtx.setCookieLocales(getCookieLocales(request));
+ localeCtx.setCookieLocales(getCookieLocales(request));
localeCtx.setSessionLocale(getSessionLocale(request));
localeCtx.setUserProfileLocale(getUserProfileLocale(reqCtx));
localeCtx.setRemoteUser(reqCtx.getRemoteUser());
@@ -325,8 +325,7 @@
}
else
{
- // disabled for now
- //saveLocaleToCookie(context, loc);
+ saveLocaleToCookie(context, loc);
}
saveSessionLocale(context, loc);
Show replies by date