Click
  1. Click
  2. CLK-107

getLocale incorrect (never takes value from the session)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      0.20

      Description

      This is the code (class Context):

      public Locale getLocale() {
      Locale locale = (Locale) getSessionAttribute(LOCALE);

      if (locale == null && clickService.getLocale() != null)

      { locale = clickService.getLocale(); }

      else

      { locale = getRequest().getLocale(); }

      return locale;
      }

      The value from the session will never be selected. It should be:

      public Locale getLocale() {
      Locale locale = (Locale) getSessionAttribute(LOCALE);

      if (locale == null) {
      if (clickService.getLocale() != null)

      { locale = clickService.getLocale(); }

      else

      { locale = getRequest().getLocale(); }

      }

      return locale;
      }

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Malcolm Edgar
            Reporter:
            Steven Van Hoof
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development