webmcp

view framework/env/request/__init.lua @ 23:3a6fe8663b26

Code cleanup and documentation added; Year in copyright notice changed to 2009-2010

Details:
- Changed quoting style in auth.openid.xrds_document{...}
- Fixed documentation for auth.openid.initiate{...}
- Added documentation for mondelefant
- Code-cleanup in mondelefant:
-- removed unneccessary lines "rows = PQntuples(res); cols = PQnfields(res);"
-- avoided extra copy of first argument (self) in mondelefant_conn_query
-- no rawget in meta-method "__index" of database result lists and objects
-- removed unreachable "return 0;" in meta-method "__newindex" of database result lists and objects
- Year in copyright notice changed to 2009-2010
- Version string changed to "1.1.1"
author jbe
date Fri Jun 04 19:00:34 2010 +0200 (2010-06-04)
parents 985024b16520
children 2f8d8edd1836
line source
1 request._status = nil
2 request._forward = nil
3 request._forward_processed = false
4 request._redirect = nil
5 request._absolute_baseurl = nil
6 request._404_route = nil
7 request._force_absolute_baseurl = false
8 request._perm_params = {}
9 request._csrf_secret = nil
10 request._json_requests_allowed = false
12 local depth
13 if cgi then -- if-clause to support interactive mode
14 depth = tonumber(cgi.params._webmcp_urldepth)
15 end
16 if depth and depth > 0 then
17 local elements = {}
18 for i = 1, depth do
19 elements[#elements+1] = "../"
20 end
21 request._relative_baseurl = table.concat(elements)
22 else
23 request._relative_baseurl = "./"
24 end
26 request._app_basepath = assert(
27 os.getenv("WEBMCP_APP_BASEPATH"),
28 'WEBMCP_APP_BASEPATH is not set.'
29 )
30 if not string.find(request._app_basepath, "/$") then
31 request._app_basebase = request._app_basepath .. "/"
32 end

Impressum / About Us