liquid_feedback_frontend
diff model/vote.lua @ 5:afd9f769c7ae
Version beta1
Final voting with Schulze-Method is now possible
Many bug fixes and code cleanup
Registration with invite codes
More sort and filter options
Seperated display of "supporters" and "potential supporters"
Optical changes
Flood limit / initiative contigent is now checked by frontend
Neccessary changes to access core beta11
Final voting with Schulze-Method is now possible
Many bug fixes and code cleanup
Registration with invite codes
More sort and filter options
Seperated display of "supporters" and "potential supporters"
Optical changes
Flood limit / initiative contigent is now checked by frontend
Neccessary changes to access core beta11
author | bsw/jbe |
---|---|
date | Fri Dec 25 12:00:00 2009 +0100 (2009-12-25) |
parents | 3bfb2fcf7ab9 |
children |
line diff
1.1 --- a/model/vote.lua Thu Dec 10 12:00:00 2009 +0100 1.2 +++ b/model/vote.lua Fri Dec 25 12:00:00 2009 +0100 1.3 @@ -1,5 +1,6 @@ 1.4 Vote = mondelefant.new_class() 1.5 Vote.table = 'vote' 1.6 +Vote.primary_key = { "initiative_id", "member_id" } 1.7 1.8 Vote:add_reference{ 1.9 mode = 'm1', 1.10 @@ -24,3 +25,10 @@ 1.11 that_key = 'id', 1.12 ref = 'author', 1.13 } 1.14 + 1.15 +function Vote:by_pk(initiative_id, member_id) 1.16 + return self:new_selector() 1.17 + :add_where{ "initiative_id = ? AND member_id = ?", initiative_id, member_id } 1.18 + :optional_object_mode() 1.19 + :exec() 1.20 +end 1.21 \ No newline at end of file