# HG changeset patch # User bsw # Date 1448988781 -3600 # Node ID f853aa830f0da289b665bd30dc6a34e33865752e # Parent 554b739f86d6b03d99727e1b83ea53f726025ed4 Removed code which is not used diff -r 554b739f86d6 -r f853aa830f0d app/main/help/_action/update.lua --- a/app/main/help/_action/update.lua Tue Dec 01 17:43:16 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -local help_ident = param.get("help_ident") -local hide = param.get("hide", atom.boolean) - -local setting_key = "liquidfeedback_frontend_hidden_help_" .. help_ident -local setting = Setting:by_pk(app.session.member.id, setting_key) - -if hide == true and not setting then - setting = Setting:new() - setting.member_id = app.session.member.id - setting.key = setting_key - setting.value = "hidden" - setting:save() -elseif hide == false and setting then - setting:destroy() -end diff -r 554b739f86d6 -r f853aa830f0d app/main/help/show.lua --- a/app/main/help/show.lua Tue Dec 01 17:43:16 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -local id = param.get_id(atom.string) - -if not id then - id = "index" -else - -- sanity check. Only allow letters, digits and _- - id = string.match(id, "[%a%d_-]*") -end - -if not app.html_title.title then - app.html_title.title = _("Help #{id}", { id = id }) -end - -local basepath = request.get_app_basepath() -local found_help = false --- we try to load any help file that fits best -for x,lang in ipairs{locale.get("lang"), "en"} do - local file_name = basepath .. "/locale/help/" .. id .. "." .. lang .. ".txt.html" - local file = io.open(file_name) - if file ~= nil then - local help_text = file:read("*a") - if #help_text > 0 then - found_help = true - ui.container{ - attr = { class = "wiki" }, - content = function() - slot.put(help_text) - end - } - break - end - end -end - -if not found_help then - ui.field.text{ value = _("Missing help text: #{id}.#{lang}.txt", { id = id, lang = locale.get("lang") }) } -end