liquid_feedback_frontend
view config/default.lua @ 172:165f4bd02cf3
don't show the first draft of a new initiative as a new draft event in the timeline
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Sun Oct 10 19:40:32 2010 +0200 (2010-10-10) |
parents | 89c4f2239442 |
children | f62c61bd912c |
line source
1 config.app_name = "LiquidFeedback"
2 config.app_version = "beta28"
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.footer_html = '<a href="somewhere">some link</a>'
12 config.use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
13 --config.use_terms_html = ""
15 config.use_terms_checkboxes = {
16 {
17 name = "nutzungsbedingungen_v1",
18 html = "Ich akzeptiere die Bedingungen.",
19 not_accepted_error = "Du musst die Bedingungen akzeptieren, um dich zu registrieren."
20 }
21 }
24 config.member_image_content_type = "image/jpeg"
25 config.member_image_convert_func = {
26 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
27 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
28 }
30 config.member_image_default_file = {
31 avatar = "avatar.jpg",
32 photo = nil
33 }
35 config.default_lang = "de"
37 config.auto_support = true
39 -- after how long is a user considered inactive and the trustee will see warning
40 config.delegation_warning_time = '6 weeks'
42 config.mail_subject_prefix = "[LiquidFeedback] "
44 config.fastpath_url_func = nil
46 config.download_dir = nil
48 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
50 config.public_access = false -- Available options: "anonymous", "pseudonym"
52 config.api_enabled = false
54 config.feature_rss_enabled = false -- feature is broken
56 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
57 config.auth_openid_enabled = false
58 config.auth_openid_https_as_default = true
59 config.auth_openid_identifier_check_func = function(uri) return false end
61 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
64 if request.get_json_request_slots() then
65 request.force_absolute_baseurl()
66 end
68 request.set_404_route{ module = 'index', view = '404' }
70 -- uncomment the following two lines to use C implementations of chosen
71 -- functions and to disable garbage collection during the request, to
72 -- increase speed:
73 --
74 -- require 'webmcp_accelerator'
75 -- collectgarbage("stop")
77 -- open and set default database handle
78 db = assert(mondelefant.connect{
79 engine='postgresql',
80 dbname='liquid_feedback'
81 })
82 at_exit(function()
83 db:close()
84 end)
85 function mondelefant.class_prototype:get_db_conn() return db end
87 -- enable output of SQL commands in trace system
88 function db:sql_tracer(command)
89 return function(error_info)
90 local error_info = error_info or {}
91 trace.sql{ command = command, error_position = error_info.position }
92 end
93 end
95 request.set_absolute_baseurl(config.absolute_base_url)
99 -- TODO abstraction
100 -- get record by id
101 function mondelefant.class_prototype:by_id(id)
102 local selector = self:new_selector()
103 selector:add_where{ 'id = ?', id }
104 selector:optional_object_mode()
105 return selector:exec()
106 end