liquid_feedback_frontend

view config/default.lua @ 535:62923420b7f8

Removed unnexessary code which caused performance issues (backported to changeset 9d463368e0d0)
author jbe
date Tue May 22 03:05:00 2012 +0200 (2012-05-22)
parents ab68f1d0f78e
children 346eb72a2a6a 8b6bc2958126
line source
1 config.app_name = "LiquidFeedback"
2 config.app_version = "2.beta5"
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 = "=== Terms of Use ===\nNothing is allowed."
13 --config.use_terms_html = ""
15 config.use_terms_checkboxes = {
16 {
17 name = "terms_of_use_v1",
18 html = "I accept the terms of use.",
19 not_accepted_error = "You have to accept the terms of use to be able to register."
20 }
21 }
23 config.locked_profile_fields = {
24 field_name = true,
25 }
27 config.member_image_content_type = "image/jpeg"
28 config.member_image_convert_func = {
29 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
30 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
31 }
33 config.member_image_default_file = {
34 avatar = "avatar.jpg",
35 photo = nil
36 }
38 config.default_lang = "de"
40 -- after how long is a user considered inactive and the trustee will see warning
41 -- notation is according to postgresql intervals
42 config.delegation_warning_time = '6 months'
44 config.mail_subject_prefix = "[LiquidFeedback] "
46 config.fastpath_url_func = nil
48 config.download_dir = nil
50 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
52 config.public_access = false -- Available options: "anonymous", "pseudonym"
54 config.api_enabled = true
56 config.feature_rss_enabled = false -- feature is broken
58 config.single_unit_id = false
60 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
61 config.auth_openid_enabled = false
62 config.auth_openid_https_as_default = true
63 config.auth_openid_identifier_check_func = function(uri) return false end
65 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
68 if request.get_json_request_slots() then
69 request.force_absolute_baseurl()
70 end
72 request.set_404_route{ module = 'index', view = '404' }
74 -- uncomment the following two lines to use C implementations of chosen
75 -- functions and to disable garbage collection during the request, to
76 -- increase speed:
77 --
78 -- require 'webmcp_accelerator'
79 -- collectgarbage("stop")
81 -- open and set default database handle
82 db = assert(mondelefant.connect{
83 engine='postgresql',
84 dbname='liquid_feedback_p'
85 })
86 at_exit(function()
87 db:close()
88 end)
89 function mondelefant.class_prototype:get_db_conn() return db end
91 -- enable output of SQL commands in trace system
92 function db:sql_tracer(command)
93 return function(error_info)
94 local error_info = error_info or {}
95 trace.sql{ command = command, error_position = error_info.position }
96 end
97 end
99 request.set_absolute_baseurl(config.absolute_base_url)
103 -- TODO abstraction
104 -- get record by id
105 function mondelefant.class_prototype:by_id(id)
106 local selector = self:new_selector()
107 selector:add_where{ 'id = ?', id }
108 selector:optional_object_mode()
109 return selector:exec()
110 end

Impressum / About Us