Project

General

Profile

Defect #17023 ยป 0001-Set-I18n-language-on-the-request-even-if-the-session.patch

Holger Just, 2014-05-28 17:11

View differences:

app/controllers/application_controller.rb
61 61
  def session_expiration
62 62
    if session[:user_id]
63 63
      if session_expired? && !try_to_autologin
64
        if session[:user_id] && user = User.active.find_by_id(session[:user_id]) && user.logged?
65
          lang = find_language(user.language)
66
        end
67
        set_language_if_valid(lang || Setting.default_language)
68

  
64 69
        reset_session
65 70
        flash[:error] = l(:error_session_expired)
66 71
        redirect_to signin_url
    (1-1/1)