Commit 28ee0e67 authored by Michael Hanus 's avatar Michael Hanus

Code refactoring

parent fa970e8e
......@@ -84,9 +84,9 @@ sessionCookie :: IO PageParam
sessionCookie = do
sessionId <- getSessionId
clockTime <- getClockTime
return (PageCookie sessionCookieName (getId (sessionId))
[CookiePath "/",
CookieExpire (addMinutes sessionLifespan clockTime)])
return $ PageCookie sessionCookieName (getId (sessionId))
[CookiePath "/",
CookieExpire (addMinutes sessionLifespan clockTime)]
--- Decorates an HTML page with session cookie.
withSessionCookie :: HtmlPage -> IO HtmlPage
......@@ -107,9 +107,9 @@ cookieInfoPage :: IO HtmlPage
cookieInfoPage = do
urlparam <- getUrlParameter
withSessionCookie $ standardPage "Cookie Info"
[ par [ htxt "This web site uses cookies for navigation and user inputs." ]
, par [ htxt "In order to proceed, please click "
, bold [href ('?' : urlparam) [htxt "here"]], htxt "." ] ]
[ par [ htxt $ "This web site uses cookies for navigation and user " ++
"inputs and preferences. In order to proceed, "
, bold [href ('?' : urlparam) [htxt "please click here."]]]]
----------------------------------------------------------------------------
-- Implementation of session stores.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment