liquid_feedback_frontend
view app/main/initiative/_action/remove_support.lua @ 11:77d58efe99fd
Version beta7
Important security fixes:
- Added missing HTML encoding to postal address of member
- Link to discussion URL only if it starts with http(s)://
Other bugfixes:
- Fixed wrong display of 2nd level delegating voters for an initiative
- Do not display invited initiators as initiators while voting
- Added missing translation
New features:
- Public message of the day
- Both direct and indirect supporter count is shown in tab heads
- Support shown in initiative lists
Language chooser at the login page has been added (again)
Important security fixes:
- Added missing HTML encoding to postal address of member
- Link to discussion URL only if it starts with http(s)://
Other bugfixes:
- Fixed wrong display of 2nd level delegating voters for an initiative
- Do not display invited initiators as initiators while voting
- Added missing translation
New features:
- Public message of the day
- Both direct and indirect supporter count is shown in tab heads
- Support shown in initiative lists
Language chooser at the login page has been added (again)
author | bsw |
---|---|
date | Fri Jan 22 12:00:00 2010 +0100 (2010-01-22) |
parents | afd9f769c7ae |
children | bde068b37608 |
line source
1 local initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec()
3 -- TODO important m1 selectors returning result _SET_!
4 local issue = initiative:get_reference_selector("issue"):for_share():single_object_mode():exec()
6 if issue.closed then
7 slot.put_into("error", _"This issue is already closed.")
8 return false
9 elseif issue.fully_frozen then
10 slot.put_into("error", _"Voting for this issue has already begun.")
11 return false
12 end
14 local member = app.session.member
16 local supporter = Supporter:by_pk(initiative.id, member.id)
18 if supporter then
19 supporter:destroy()
20 slot.put_into("notice", _"Your support has been removed from this initiative")
21 else
22 slot.put_into("notice", _"You are already not supporting this initiative")
23 end