liquid_feedback_frontend
diff app/main/suggestion/_action/add.lua @ 904:a176129ce282
Add support for poll mode; Forbid postings unless contingents are configured
author | bsw |
---|---|
date | Sun Aug 26 22:37:49 2012 +0200 (2012-08-26) |
parents | b77e6a17ca77 |
children | 1997cf1da04b |
line diff
1.1 --- a/app/main/suggestion/_action/add.lua Tue Aug 21 01:29:28 2012 +0200 1.2 +++ b/app/main/suggestion/_action/add.lua Sun Aug 26 22:37:49 2012 +0200 1.3 @@ -1,5 +1,5 @@ 1.4 -local tmp = db:query({ "SELECT text_entries_left FROM member_contingent_left WHERE member_id = ?", app.session.member.id }, "opt_object") 1.5 -if tmp and tmp.text_entries_left and tmp.text_entries_left < 1 then 1.6 +local tmp = db:query({ "SELECT text_entries_left FROM member_contingent_left WHERE member_id = ? AND NOT polling", app.session.member.id }, "opt_object") 1.7 +if not tmp or tmp.text_entries_left < 1 then 1.8 slot.put_into("error", _"Sorry, you have reached your personal flood limit. Please be slower...") 1.9 return false 1.10 end