liquid_feedback_frontend

diff app/main/index/_motd.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 4f39f0a0d5b5
children
line diff
     1.1 --- a/app/main/index/_motd.lua	Thu Apr 22 21:01:46 2010 +0200
     1.2 +++ b/app/main/index/_motd.lua	Fri Apr 23 14:13:08 2010 +0200
     1.3 @@ -1,15 +1,9 @@
     1.4 -local lang = locale.get("lang")
     1.5 -local basepath = request.get_app_basepath() 
     1.6 -local file_name = basepath .. "/locale/motd/" .. lang .. ".txt"
     1.7 -local file = io.open(file_name)
     1.8 -if file ~= nil then
     1.9 -  local help_text = file:read("*a")
    1.10 -  if #help_text > 0 then
    1.11 -    ui.container{
    1.12 -      attr = { class = "wiki" },
    1.13 -      content = function()
    1.14 -        slot.put(format.wiki_text(help_text))
    1.15 -      end
    1.16 -    }
    1.17 -  end
    1.18 +if config.motd_intern then
    1.19 +  local help_text = config.motd_intern
    1.20 +  ui.container{
    1.21 +    attr = { class = "wiki" },
    1.22 +    content = function()
    1.23 +      slot.put(format.wiki_text(help_text))
    1.24 +    end
    1.25 +  }
    1.26  end

Impressum / About Us