webmcp
view framework/env/request/__init.lua @ 1:985024b16520
Version 1.0.1
New feature: JSON requests
Changes in ui.paginate: Current page setting is directly fetched from CGI params, instead of view params
Changed behavior of load methods of atom library to accept nil as input
Bugfixes in mondelefant_atom_connector timestamp(tz) loaders
Added global constant _WEBMCP_VERSION containing a version string
New feature: JSON requests
Changes in ui.paginate: Current page setting is directly fetched from CGI params, instead of view params
Changed behavior of load methods of atom library to accept nil as input
Bugfixes in mondelefant_atom_connector timestamp(tz) loaders
Added global constant _WEBMCP_VERSION containing a version string
author | jbe |
---|---|
date | Tue Nov 17 12:00:00 2009 +0100 (2009-11-17) |
parents | 9fdfb27f8e67 |
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