webmcp

view framework/env/request/forward.lua @ 28:ea2e8f3a2776

allow webmcp path to be set in cgi script

this allows another script to include the webmcp script when the cwd is not the cgi-bin. the script needs to set the WEBMCP_PATH variable.
author Daniel Poelzleithner <poelzi@poelzi.org>
date Sun Sep 19 01:36:08 2010 +0200 (2010-09-19)
parents 9fdfb27f8e67
children
line source
1 --[[--
2 request.forward{
3 module = module, -- module name
4 view = view -- view name
5 }
7 This function is called automatically to forward to another view, after an action and all its filters have finished execution, if routing mode "forward" has been chosen. Calling request.forward{...} (or request.redirect{...}) explicitly inside an action will cause routing information from the browser to be ignored. Calling request.forward{...} causes all GET/POST parameters of the action to be preserved for the given view.
9 --]]--
11 function request.forward(args)
12 if request.is_rerouted() then
13 error("Tried to forward after another forward or redirect.")
14 end
15 request._forward = args
16 trace.forward { module = args.module, view = args.view }
17 end

Impressum / About Us