webmcp
view framework/env/request/__init.lua @ 2:72860d232f32
Version 1.0.2
Fixed bug with explicit garbage collection (requests > 256kB caused an error)
Views prefixed with an underscore can't be called externally
ui.paginate now displays the last page, if the selected page number is too high.
Fixed bug with explicit garbage collection (requests > 256kB caused an error)
Views prefixed with an underscore can't be called externally
ui.paginate now displays the last page, if the selected page number is too high.
| author | jbe/bsw | 
|---|---|
| date | Thu Dec 10 12:00:00 2009 +0100 (2009-12-10) | 
| 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
