liquid_feedback_frontend

view config/default.lua @ 3:768faea1096d

Version alpha4

Members interested in an issue or supporting an initiative have a weight information attached. Browsing the members causing that weight is possible.

Initiatives may provide a link to an external discussion platform

Direct link on every initiative page to create an alternative initiative

Bugfix: No error when clicking "neutral", when "neutral" is currently selected
author bsw
date Mon Nov 30 12:00:00 2009 +0100 (2009-11-30)
parents 5c601807d397
children 80c215dbf076
line source
1 config.app_name = "LiquidFeedback"
2 config.app_version = "alpha4"
4 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)"
6 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
8 config.member_image_convert = {
9 avatar = { "convert", "-", "-thumbnail", "48x48", "jpeg:-" }
10 }
12 -- uncomment the following two lines to use C implementations of chosen
13 -- functions and to disable garbage collection during the request, to
14 -- increase speed:
15 --
16 -- require 'webmcp_accelerator'
17 -- collectgarbage("stop")
19 -- open and set default database handle
20 db = assert(mondelefant.connect{
21 engine='postgresql',
22 dbname='liquid_feedback'
23 })
24 at_exit(function()
25 db:close()
26 end)
27 function mondelefant.class_prototype:get_db_conn() return db end
29 -- enable output of SQL commands in trace system
30 function db:sql_tracer(command)
31 return function(error_info)
32 local error_info = error_info or {}
33 trace.sql{ command = command, error_position = error_info.position }
34 end
35 end
37 -- 'request.get_relative_baseurl()' should be replaced by the absolute
38 -- base URL of the application, as otherwise HTTP redirects will not be
39 -- standard compliant
40 request.set_absolute_baseurl(request.get_relative_baseurl())
44 -- TODO abstraction
45 -- get record by id
46 function mondelefant.class_prototype:by_id(id)
47 local selector = self:new_selector()
48 selector:add_where{ 'id = ?', id }
49 selector:optional_object_mode()
50 return selector:exec()
51 end

Impressum / About Us