liquid_feedback_frontend
view app/main/draft/_action/add.lua @ 0:3bfb2fcf7ab9
Version alpha1
| author | bsw/jbe | 
|---|---|
| date | Wed Nov 18 12:00:00 2009 +0100 (2009-11-18) | 
| parents | |
| children | 80c215dbf076 | 
 line source
     1 local initiative = Initiative:by_id(param.get("initiative_id", atom.integer))
     3 if Initiator:by_pk(initiative.id, app.session.member.id) then
     4   local draft = Draft:new()
     5   draft.author_id = app.session.member.id
     6   draft.initiative_id = initiative.id
     7   draft.content = param.get("content")
     8   draft:save()
    10   slot.put_into("notice", _"New draft has been added to initiative")
    12 else
    13   error('access denied')
    14 end
