liquid_feedback_frontend

annotate config/default.lua @ 75:733f65c0c0a0

Bugfixes, feature enhancements, code-cleanup, and major work on API

Details:
- API
-- Allow relation name to be passed to helper function util.autoapi{...}
-- Added area API
-- Bugfixes in API
--- Correctly return initiatives (bug #162)
--- Correctly process "id" parameter for initiative API
--- Bugfix related to "state" parameter (bug #165)
--- Changed constant "discussion" to "accepted" (in model/issue.lua, used by API)
--- Fixed JSON encoding in auto_api (bug #181)
--- Ignore list filter "voted" in case of public access
--- Enable access to API without session
- Work on RSS feed (incomplete yet)
- Other bugfixes
-- Handle empty browser identification string
-- Handle invalid date in member/update.lua (bugs #24 #109 #115 #136)
-- Better handle errors while converting uploaded images. (bug #79 +5 duplicates)
-- Don't display revoked initiatives in list of new drafts (bug #134)
-- Fixed syntax error in app/main/member/_action/update_name.lua throwing unexpected error, when new name was too short
-- Do not display refresh support button for revoked initiatives
-- Repaired issue search (bug #150)
-- Fixed typos in german translation files
--- "initi(i)erte"
--- "Er(g)eignisse" (bug #161)
- Code cleanup
-- Removed deprecated motd files locale/motd/de.txt and locale/motd/de_public.txt
-- Removed redundant code in app/main/index/_updated_drafts.lua
- New features and (optical) enhancements
-- Support change of notify email; notification of not approved address added to start page
-- Settings dialog splitted into single pages
-- Mark deactivated members
-- Calendar for birthday selection in profile
-- Policy list public readable when public access is enabled
author bsw
date Thu Jul 08 18:44:02 2010 +0200 (2010-07-08)
parents c553898f64cb
children 07177cd8c256
rev   line source
bsw/jbe@0 1 config.app_name = "LiquidFeedback"
bsw@75 2 config.app_version = "beta19"
bsw/jbe@0 3
bsw/jbe@0 4 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)"
bsw/jbe@0 5
bsw/jbe@4 6 config.app_logo = nil
bsw/jbe@4 7
bsw/jbe@0 8 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
bsw/jbe@0 9
bsw/jbe@6 10 config.use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
bsw/jbe@6 11
bsw/jbe@52 12 config.member_image_content_type = "image/jpeg"
bsw/jbe@4 13 config.member_image_convert_func = {
bsw/jbe@4 14 avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "48x48", "jpeg:-") end,
bsw/jbe@4 15 photo = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
bsw@2 16 }
bsw@2 17
bsw/jbe@4 18 config.member_image_default_file = {
bsw/jbe@4 19 avatar = "avatar.jpg",
bsw/jbe@4 20 photo = nil
bsw/jbe@4 21 }
bsw/jbe@4 22
bsw/jbe@6 23 config.mail_subject_prefix = "[LiquidFeedback] "
bsw/jbe@6 24
bsw/jbe@4 25 config.fastpath_url_func = nil
bsw/jbe@4 26
bsw/jbe@6 27 config.download_dir = nil
bsw/jbe@6 28
bsw/jbe@6 29 config.download_use_terms = "=== Nutzungsbedingungen ===\nAlles ist verboten"
bsw/jbe@4 30
bsw@51 31 config.public_access = false -- Available options: "anonymous", "pseudonym"
bsw@51 32
bsw@51 33 config.api_enabled = false
bsw@51 34
bsw@75 35 config.feature_rss_enabled = false -- feature is broken
bsw/jbe@52 36
bsw@51 37 -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
bsw@51 38 config.auth_openid_enabled = false
bsw@51 39 config.auth_openid_https_as_default = true
bsw@51 40 config.auth_openid_identifier_check_func = function(uri) return false end
bsw@51 41
bsw/jbe@19 42 request.set_allowed_json_request_slots{ "title", "actions", "support", "default", "trace", "system_error" }
bsw/jbe@19 43
bsw@51 44
bsw/jbe@19 45 if request.get_json_request_slots() then
bsw/jbe@19 46 request.force_absolute_baseurl()
bsw/jbe@19 47 end
bsw@8 48
bsw@8 49 request.set_404_route{ module = 'index', view = '404' }
bsw@8 50
bsw/jbe@0 51 -- uncomment the following two lines to use C implementations of chosen
bsw/jbe@0 52 -- functions and to disable garbage collection during the request, to
bsw/jbe@0 53 -- increase speed:
bsw/jbe@0 54 --
bsw/jbe@0 55 -- require 'webmcp_accelerator'
bsw/jbe@0 56 -- collectgarbage("stop")
bsw/jbe@0 57
bsw/jbe@0 58 -- open and set default database handle
bsw/jbe@0 59 db = assert(mondelefant.connect{
bsw/jbe@0 60 engine='postgresql',
bsw/jbe@0 61 dbname='liquid_feedback'
bsw/jbe@0 62 })
bsw/jbe@0 63 at_exit(function()
bsw/jbe@0 64 db:close()
bsw/jbe@0 65 end)
bsw/jbe@0 66 function mondelefant.class_prototype:get_db_conn() return db end
bsw/jbe@0 67
bsw/jbe@0 68 -- enable output of SQL commands in trace system
bsw/jbe@0 69 function db:sql_tracer(command)
bsw/jbe@0 70 return function(error_info)
bsw/jbe@0 71 local error_info = error_info or {}
bsw/jbe@0 72 trace.sql{ command = command, error_position = error_info.position }
bsw/jbe@0 73 end
bsw/jbe@0 74 end
bsw/jbe@0 75
bsw/jbe@6 76 request.set_absolute_baseurl(config.absolute_base_url)
bsw/jbe@0 77
bsw/jbe@0 78
bsw/jbe@0 79
bsw@2 80 -- TODO abstraction
bsw/jbe@0 81 -- get record by id
bsw/jbe@0 82 function mondelefant.class_prototype:by_id(id)
bsw/jbe@0 83 local selector = self:new_selector()
bsw/jbe@0 84 selector:add_where{ 'id = ?', id }
bsw/jbe@0 85 selector:optional_object_mode()
bsw/jbe@0 86 return selector:exec()
bsw/jbe@0 87 end
bsw/jbe@0 88
bsw@2 89

Impressum / About Us