liquid_feedback_frontend

changeset 48:df5392f114e2

Use new WebMCP function request.set_cookie{...} to secure cookies; Display correct status of cancelled initiatives
author bsw/jbe
date Thu Mar 25 18:04:02 2010 +0100 (2010-03-25)
parents 8e9436ea3017
children a4e6f30fa84d
files app/main/_filter/20_session.lua app/main/initiative/_list_element.lua
line diff
     1.1 --- a/app/main/_filter/20_session.lua	Mon Mar 15 03:10:14 2010 +0100
     1.2 +++ b/app/main/_filter/20_session.lua	Thu Mar 25 18:04:02 2010 +0100
     1.3 @@ -3,7 +3,10 @@
     1.4  end
     1.5  if not app.session then
     1.6    app.session = Session:new()
     1.7 -  cgi.add_header('Set-Cookie: liquid_feedback_session=' .. app.session.ident .. '; path=/' )
     1.8 +  request.set_cookie{
     1.9 +    name = "liquid_feedback_session",
    1.10 +    value = app.session.ident
    1.11 +  }
    1.12  end
    1.13  
    1.14  request.set_csrf_secret(app.session.additional_secret)
     2.1 --- a/app/main/initiative/_list_element.lua	Mon Mar 15 03:10:14 2010 +0100
     2.2 +++ b/app/main/initiative/_list_element.lua	Thu Mar 25 18:04:02 2010 +0100
     2.3 @@ -88,7 +88,7 @@
     2.4              {
     2.5                field_attr = { style = "width: 110px; padding: 0;"},
     2.6                content = function()
     2.7 -                if initiative.issue.accepted and initiative.issue.closed then
     2.8 +                if initiative.issue.fully_frozen and initiative.issue.closed then
     2.9                    if initiative.issue.ranks_available then 
    2.10                      if initiative.negative_votes and initiative.positive_votes then
    2.11                        local max_value = initiative.issue.voter_count

Impressum / About Us