liquid_feedback_frontend

view config/default.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
author bsw/jbe
date Fri Dec 25 12:00:00 2009 +0100 (2009-12-25)
parents 80c215dbf076
children 8d91bccab0bf
line source
1 config.app_name = "LiquidFeedback"
2 config.app_version = "beta1"
4 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)"
6 config.app_logo = nil
8 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
10 config.member_image_convert_func = {
11 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
12 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
13 }
15 config.member_image_default_file = {
16 avatar = "avatar.jpg",
17 photo = nil
18 }
20 config.fastpath_url_func = nil
23 -- uncomment the following two lines to use C implementations of chosen
24 -- functions and to disable garbage collection during the request, to
25 -- increase speed:
26 --
27 -- require 'webmcp_accelerator'
28 -- collectgarbage("stop")
30 -- open and set default database handle
31 db = assert(mondelefant.connect{
32 engine='postgresql',
33 dbname='liquid_feedback'
34 })
35 at_exit(function()
36 db:close()
37 end)
38 function mondelefant.class_prototype:get_db_conn() return db end
40 -- enable output of SQL commands in trace system
41 function db:sql_tracer(command)
42 return function(error_info)
43 local error_info = error_info or {}
44 trace.sql{ command = command, error_position = error_info.position }
45 end
46 end
48 -- 'request.get_relative_baseurl()' should be replaced by the absolute
49 -- base URL of the application, as otherwise HTTP redirects will not be
50 -- standard compliant
51 request.set_absolute_baseurl(request.get_relative_baseurl())
55 -- TODO abstraction
56 -- get record by id
57 function mondelefant.class_prototype:by_id(id)
58 local selector = self:new_selector()
59 selector:add_where{ 'id = ?', id }
60 selector:optional_object_mode()
61 return selector:exec()
62 end

Impressum / About Us