liquid_feedback_frontend

diff app/main/draft/_action/add.lua @ 81:134fce4bede3

Cache for rendered wiki texts; Accountless API keys; Reverse id order for initiative API
- Support for caching html version of drafts
- Using pre-rendered html versions of help messages
- Added Support for api keys not connected to an account
- Added order option "id_desc" to initiative API
author bsw
date Sat Jul 24 17:22:05 2010 +0200 (2010-07-24)
parents 72c5e0ee7c98
children 6a12fb7e4963
line diff
     1.1 --- a/app/main/draft/_action/add.lua	Thu Jul 15 18:28:24 2010 +0200
     1.2 +++ b/app/main/draft/_action/add.lua	Sat Jul 24 17:22:05 2010 +0200
     1.3 @@ -22,10 +22,8 @@
     1.4    error("access denied")
     1.5  end
     1.6  
     1.7 -local draft = Draft:new()
     1.8 -draft.author_id = app.session.member.id
     1.9 -draft.initiative_id = initiative.id
    1.10  local formatting_engine = param.get("formatting_engine")
    1.11 +
    1.12  local formatting_engine_valid = false
    1.13  for fe, dummy in pairs(config.formatting_engine_executeables) do
    1.14    if formatting_engine == fe then
    1.15 @@ -35,9 +33,16 @@
    1.16  if not formatting_engine_valid then
    1.17    error("invalid formatting engine!")
    1.18  end
    1.19 +
    1.20 +
    1.21 +local draft = Draft:new()
    1.22 +draft.author_id = app.session.member.id
    1.23 +draft.initiative_id = initiative.id
    1.24  draft.formatting_engine = formatting_engine
    1.25  draft.content = param.get("content")
    1.26  draft:save()
    1.27  
    1.28 +draft:render_content()
    1.29 +
    1.30  slot.put_into("notice", _"New draft has been added to initiative")
    1.31  

Impressum / About Us