liquid_feedback_frontend
diff app/main/initiative/_action/create.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
- 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 | 3ec1dea6eefb | 
| children | 6a12fb7e4963 | 
   line diff
1.1 --- a/app/main/initiative/_action/create.lua Thu Jul 15 18:28:24 2010 +0200 1.2 +++ b/app/main/initiative/_action/create.lua Sat Jul 24 17:22:05 2010 +0200 1.3 @@ -33,8 +33,6 @@ 1.4 end 1.5 end 1.6 1.7 - 1.8 - 1.9 local name = param.get("name") 1.10 1.11 local name = util.trim(name) 1.12 @@ -44,6 +42,20 @@ 1.13 return false 1.14 end 1.15 1.16 +local formatting_engine = param.get("formatting_engine") 1.17 + 1.18 +local formatting_engine_valid = false 1.19 +for fe, dummy in pairs(config.formatting_engine_executeables) do 1.20 + if formatting_engine == fe then 1.21 + formatting_engine_valid = true 1.22 + end 1.23 +end 1.24 +if not formatting_engine_valid then 1.25 + error("invalid formatting engine!") 1.26 +end 1.27 + 1.28 + 1.29 + 1.30 local initiative = Initiative:new() 1.31 1.32 if not issue then 1.33 @@ -77,16 +89,6 @@ 1.34 1.35 local draft = Draft:new() 1.36 draft.initiative_id = initiative.id 1.37 -local formatting_engine = param.get("formatting_engine") 1.38 -local formatting_engine_valid = false 1.39 -for fe, dummy in pairs(config.formatting_engine_executeables) do 1.40 - if formatting_engine == fe then 1.41 - formatting_engine_valid = true 1.42 - end 1.43 -end 1.44 -if not formatting_engine_valid then 1.45 - error("invalid formatting engine!") 1.46 -end 1.47 draft.formatting_engine = formatting_engine 1.48 draft.content = param.get("draft") 1.49 draft.author_id = app.session.member.id