liquid_feedback_frontend

diff app/main/_prefork/10_init.lua @ 1222:a38df55525d6

Removed support for old WebMCP 1.x and clean up of example configuration
author bsw
date Tue Dec 01 13:59:16 2015 +0100 (2015-12-01)
parents 30b3bf5db1bb
children a3e9e3433852
line diff
     1.1 --- a/app/main/_prefork/10_init.lua	Tue Dec 01 02:10:40 2015 +0100
     1.2 +++ b/app/main/_prefork/10_init.lua	Tue Dec 01 13:59:16 2015 +0100
     1.3 @@ -1,3 +1,65 @@
     1.4 +config.app_version = "3.0.9"
     1.5 +
     1.6 +-- TODO abstraction
     1.7 +-- get record by id
     1.8 +function mondelefant.class_prototype:by_id(id)
     1.9 +  local selector = self:new_selector()
    1.10 +  selector:add_where{ 'id = ?', id }
    1.11 +  selector:optional_object_mode()
    1.12 +  return selector:exec()
    1.13 +end
    1.14 +
    1.15 +if not config.password_hash_algorithm then
    1.16 +  config.password_hash_algorithm = "crypt_sha512"
    1.17 +end
    1.18 +
    1.19 +if not config.password_hash_min_rounds then
    1.20 + config.password_hash_min_rounds = 10000
    1.21 +end
    1.22 +
    1.23 +if not config.password_hash_max_rounds then
    1.24 +  config.password_hash_max_rounds = 20000
    1.25 +end
    1.26 +
    1.27 +if config.enabled_languages == nil then
    1.28 +  config.enabled_languages = { 'en', 'de', 'ka' } --, 'eo', 'el', 'hu', 'it', 'nl', 'zh-Hans', 'zh-TW' }
    1.29 +end
    1.30 +
    1.31 +if config.default_lang == nil then
    1.32 +  config.default_lang = "en"
    1.33 +end
    1.34 +
    1.35 +if config.mail_subject_prefix == nil then
    1.36 +  config.mail_subject_prefix = "[LiquidFeedback] "
    1.37 +end
    1.38 +
    1.39 +if config.member_image_content_type == nil then
    1.40 +  config.member_image_content_type = "image/jpeg"
    1.41 +end
    1.42 +
    1.43 +if config.member_image_convert_func == nil then
    1.44 +  config.member_image_convert_func = {
    1.45 +    avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail",   "48x48", "jpeg:-") end,
    1.46 +    photo =  function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
    1.47 +  }
    1.48 +end
    1.49 +
    1.50 +if config.locked_profile_fields == nil then
    1.51 +  config.locked_profile_fields = {}
    1.52 +end
    1.53 +
    1.54 +if config.check_delegations_default == nil then
    1.55 +  config.check_delegations_default = "confirm"
    1.56 +end
    1.57 +
    1.58 +if config.ldap == nil then
    1.59 +  config.ldap = {}
    1.60 +end
    1.61 +
    1.62 +if not config.database then
    1.63 +  config.database = { engine='postgresql', dbname='liquid_feedback' }
    1.64 +end
    1.65 +
    1.66  if config.fork == nil then
    1.67    config.fork = {}
    1.68  end
    1.69 @@ -61,6 +123,10 @@
    1.70    listen_options[#listen_options+1] = { proto = "tcp", host = host, port = config.port }
    1.71  end
    1.72  
    1.73 +request.set_404_route{ module = 'index', view = '404' }
    1.74 +
    1.75 +request.set_absolute_baseurl(config.absolute_base_url)
    1.76 +
    1.77  listen(listen_options)
    1.78  
    1.79  listen{

Impressum / About Us