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

getLocale incorrect (never takes value from the session)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • core
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: