liquid_feedback_frontend

diff app/main/suggestion/_action/add.lua @ 279:23c98752e697

Added wiki support for suggestions and member statements
author bsw
date Thu Feb 16 14:08:43 2012 +0100 (2012-02-16)
parents 53a45356c107
children b77e6a17ca77
line diff
     1.1 --- a/app/main/suggestion/_action/add.lua	Mon Feb 13 01:53:41 2012 +0100
     1.2 +++ b/app/main/suggestion/_action/add.lua	Thu Feb 16 14:08:43 2012 +0100
     1.3 @@ -12,11 +12,28 @@
     1.4    return false
     1.5  end
     1.6  
     1.7 +local formatting_engine = param.get("formatting_engine")
     1.8 +
     1.9 +local formatting_engine_valid = false
    1.10 +for fe, dummy in pairs(config.formatting_engine_executeables) do
    1.11 +  if formatting_engine == fe then
    1.12 +    formatting_engine_valid = true
    1.13 +  end
    1.14 +end
    1.15 +if not formatting_engine_valid then
    1.16 +  error("invalid formatting engine!")
    1.17 +end
    1.18 +
    1.19 +if param.get("preview") then
    1.20 +  return
    1.21 +end
    1.22 +
    1.23  local suggestion = Suggestion:new()
    1.24  
    1.25  suggestion.author_id = app.session.member.id
    1.26  suggestion.name = name
    1.27 -param.update(suggestion, "description", "initiative_id")
    1.28 +suggestion.formatting_engine = formatting_engine
    1.29 +param.update(suggestion, "content", "initiative_id")
    1.30  suggestion:save()
    1.31  
    1.32  -- TODO important m1 selectors returning result _SET_!

Impressum / About Us