liquid_feedback_frontend
view config/default.lua @ 1:dd0109e81922
Version alpha2
Minor bug in bargraph output for suggestions fixed
Minor bug in bargraph output for suggestions fixed
| author | bsw | 
|---|---|
| date | Wed Nov 18 12:00:00 2009 +0100 (2009-11-18) | 
| parents | 3bfb2fcf7ab9 | 
| children | 5c601807d397 | 
 line source
     1 config.app_name = "LiquidFeedback"
     2 config.app_version = "alpha2"
     4 config.app_title = config.app_name .. " (" .. request.get_config_name() .. " environment)"
     6 config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany"
     8 -- uncomment the following two lines to use C implementations of chosen
     9 -- functions and to disable garbage collection during the request, to
    10 -- increase speed:
    11 --
    12 -- require 'webmcp_accelerator'
    13 -- collectgarbage("stop")
    15 -- open and set default database handle
    16 db = assert(mondelefant.connect{
    17   engine='postgresql',
    18   dbname='liquid_feedback'
    19 })
    20 at_exit(function() 
    21   db:close()
    22 end)
    23 function mondelefant.class_prototype:get_db_conn() return db end
    25 -- enable output of SQL commands in trace system
    26 function db:sql_tracer(command)
    27   return function(error_info)
    28     local error_info = error_info or {}
    29     trace.sql{ command = command, error_position = error_info.position }
    30   end
    31 end
    33 -- 'request.get_relative_baseurl()' should be replaced by the absolute
    34 -- base URL of the application, as otherwise HTTP redirects will not be
    35 -- standard compliant
    36 request.set_absolute_baseurl(request.get_relative_baseurl())
    41 -- get record by id
    42 function mondelefant.class_prototype:by_id(id)
    43   local selector = self:new_selector()
    44   selector:add_where{ 'id = ?', id }
    45   selector:optional_object_mode()
    46   return selector:exec()
    47 end
