# HG changeset patch # User bsw # Date 1340897568 -7200 # Node ID 9d104952554af73eeddd72966539f6513c86550e # Parent 9c88e513a8f797b2d53b9c0e65d1b1b33bdfbef5 Completed cleanup of config diff -r 9c88e513a8f7 -r 9d104952554a config/example.lua --- a/config/example.lua Thu Jun 28 17:24:18 2012 +0200 +++ b/config/example.lua Thu Jun 28 17:32:48 2012 +0200 @@ -2,10 +2,6 @@ -- MANDATORY CONFIG OPTIONS (MUST BE SET!) -- ======================================================================== --- Name of this instance, defaults to name of config file --- ------------------------------------------------------------------------ -config.instance_name = "Instance name" - -- Information about service provider (HTML) -- ------------------------------------------------------------------------ config.app_service_provider = "Snake Oil
10000 Berlin
Germany" @@ -21,7 +17,12 @@ name = "terms_of_use_v1", html = "I accept the terms of use.", not_accepted_error = "You have to accept the terms of use to be able to register." - } + }, +-- { +-- name = "extra_terms_of_use_v1", +-- html = "I accept the extra terms of use.", +-- not_accepted_error = "You have to accept the extra terms of use to be able to register." +-- } } -- ======================================================================== @@ -29,6 +30,10 @@ -- Remove leading -- to enable a option -- ======================================================================== +-- Name of this instance, defaults to name of config file +-- ------------------------------------------------------------------------ +-- config.instance_name = "Instance name" + -- Connection information for the LiquidFeedback database -- ------------------------------------------------------------------------ -- config.database = { engine='postgresql', dbname='liquid_feedback' } @@ -45,14 +50,17 @@ -- ------------------------------------------------------------------------ -- config.default_lang = "en" --- after how long is a user considered inactive and the trustee will see warning --- notation is according to postgresql intervals +-- after how long is a user considered inactive and the trustee will see warning, +-- notation is according to postgresql intervals, default: no warning at all -- ------------------------------------------------------------------------ -- config.delegation_warning_time = '6 months' --- Sender and prefix of all automatic mails, default to "[Liquid Feedback] " +-- Prefix of all automatic mails, defaults to "[Liquid Feedback] " -- ------------------------------------------------------------------------ -- config.mail_subject_prefix = "[LiquidFeedback] " + +-- Sender of all automatic mails, defaults to system defaults +-- ------------------------------------------------------------------------ -- config.mail_envelope_from = "liquid-support@example.com" -- config.mail_from = "LiquidFeedback" -- config.mail_reply_to = "liquid-support@example.com" @@ -71,10 +79,11 @@ -- Set public access level -- Available options: false, "anonymous", "pseudonym", "full" +-- Defaults to "full" -- ------------------------------------------------------------------------ -- config.public_access = "full" --- Use custom image conversion +-- Use custom image conversion, defaults to ImageMagick's convert -- ------------------------------------------------------------------------ --config.member_image_content_type = "image/jpeg" --config.member_image_convert_func = { @@ -82,7 +91,7 @@ -- photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end --} --- Integration of Etherpad +-- Integration of Etherpad, disabled by default -- ------------------------------------------------------------------------ --config.etherpad = { -- base_url = "http://example.com:9001/", @@ -102,7 +111,7 @@ -- ======================================================================== --- Do main initialisation (DO NOT REMOVE THIS SECTION) +-- Do main initialisation (DO NOT REMOVE FOLLOWING SECTION) -- ======================================================================== execute.config("init") diff -r 9c88e513a8f7 -r 9d104952554a config/init.lua --- a/config/init.lua Thu Jun 28 17:24:18 2012 +0200 +++ b/config/init.lua Thu Jun 28 17:32:48 2012 +0200 @@ -1,3 +1,9 @@ +-- ======================================================================== +-- DO NOT CHANGE ANYTHING IN THIS FILE +-- (except when you really know what you are doing!) +-- ======================================================================== + + config.app_version = "2.beta12" if not config.instance_name then @@ -39,6 +45,10 @@ } end +if config.public_access == nil then + config.public_access = "full" +end + if not config.database then config.database = { engine='postgresql', dbname='liquid_feedback' } end @@ -46,7 +56,7 @@ request.set_404_route{ module = 'index', view = '404' } -- open and set default database handle -db = assert(mondelefant.connect(config.database) +db = assert(mondelefant.connect(config.database)) at_exit(function() db:close() end) @@ -63,7 +73,6 @@ request.set_absolute_baseurl(config.absolute_base_url) - -- TODO abstraction -- get record by id function mondelefant.class_prototype:by_id(id)