liquid_feedback_frontend

view config/default.lua @ 9:0ee1e0c42d4c

Version beta5

Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.

Changing of name and login is possible while a history of these changes is written and accessible by all users.

Statistics shown in area list

Trimming of user input also converts multiple whitespaces to single space character.
author bsw
date Mon Jan 04 12:00:00 2010 +0100 (2010-01-04)
parents 374bbc2ff102
children 72c5e0ee7c98
line source
1 config.app_name = "LiquidFeedback"
2 config.app_version = "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.use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
12 config.member_image_convert_func = {
13 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
14 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
15 }
17 config.member_image_default_file = {
18 avatar = "avatar.jpg",
19 photo = nil
20 }
22 config.mail_subject_prefix = "[LiquidFeedback] "
24 config.fastpath_url_func = nil
26 config.download_dir = nil
28 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
31 request.set_404_route{ module = 'index', view = '404' }
33 -- uncomment the following two lines to use C implementations of chosen
34 -- functions and to disable garbage collection during the request, to
35 -- increase speed:
36 --
37 -- require 'webmcp_accelerator'
38 -- collectgarbage("stop")
40 -- open and set default database handle
41 db = assert(mondelefant.connect{
42 engine='postgresql',
43 dbname='liquid_feedback'
44 })
45 at_exit(function()
46 db:close()
47 end)
48 function mondelefant.class_prototype:get_db_conn() return db end
50 -- enable output of SQL commands in trace system
51 function db:sql_tracer(command)
52 return function(error_info)
53 local error_info = error_info or {}
54 trace.sql{ command = command, error_position = error_info.position }
55 end
56 end
58 request.set_absolute_baseurl(config.absolute_base_url)
62 -- TODO abstraction
63 -- get record by id
64 function mondelefant.class_prototype:by_id(id)
65 local selector = self:new_selector()
66 selector:add_where{ 'id = ?', id }
67 selector:optional_object_mode()
68 return selector:exec()
69 end

Impressum / About Us