liquid_feedback_frontend
diff app/main/area/list.lua @ 69:c553898f64cb
Moved motd from locale/motd/*-files to configuration setting
| author | bsw |
|---|---|
| date | Fri Apr 23 14:13:08 2010 +0200 (2010-04-23) |
| parents | 0849be391140 |
| children | c0835d707465 |
line diff
1.1 --- a/app/main/area/list.lua Thu Apr 22 21:01:46 2010 +0200 1.2 +++ b/app/main/area/list.lua Fri Apr 23 14:13:08 2010 +0200 1.3 @@ -4,20 +4,14 @@ 1.4 slot.put_into("title", encode.html(config.app_title)) 1.5 end 1.6 1.7 -local lang = locale.get("lang") 1.8 -local basepath = request.get_app_basepath() 1.9 -local file_name = basepath .. "/locale/motd/" .. lang .. "_public.txt" 1.10 -local file = io.open(file_name) 1.11 -if file ~= nil then 1.12 - local help_text = file:read("*a") 1.13 - if #help_text > 0 then 1.14 - ui.container{ 1.15 - attr = { class = "motd wiki" }, 1.16 - content = function() 1.17 - slot.put(format.wiki_text(help_text)) 1.18 - end 1.19 - } 1.20 - end 1.21 +if not app.session.member_id and config.motd_public then 1.22 + local help_text = config.motd_public 1.23 + ui.container{ 1.24 + attr = { class = "wiki motd" }, 1.25 + content = function() 1.26 + slot.put(format.wiki_text(help_text)) 1.27 + end 1.28 + } 1.29 end 1.30 1.31 util.help("area.list", _"Area list")