liquid_feedback_frontend
view app/main/index/_action/set_lang.lua @ 1529:87e2a58bef9e
Fixed add_support for usage without access token
| author | bsw | 
|---|---|
| date | Mon Sep 14 18:31:20 2020 +0200 (2020-09-14) | 
| parents | f52f918b38b8 | 
| children | 
 line source
     1 local lang = param.get("lang")
     2 local valid_lang = false
     3 for i, tmp_lang in ipairs(config.enabled_languages) do
     4   if lang == tmp_lang then
     5     valid_lang = true
     6   end
     7 end
     8 if valid_lang then
     9   app.session.lang = lang
    10   app.session:save()
    11   if app.session.member_id then
    12     app.session.member.lang = app.session.lang
    13     app.session.member:save()
    14   end
    15 end
