Uploaded image for project: 'Click'
  1. Click
  2. CLK-107

getLocale incorrect (never takes value from the session)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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;
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: