webmcp
annotate framework/env/execute/view.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.
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 | eb3e236d261d |
rev | line source |
---|---|
jbe/bsw@0 | 1 --[[-- |
jbe/bsw@0 | 2 execute.view{ |
jbe/bsw@0 | 3 module = module, -- module name of the view to be executed |
jbe/bsw@0 | 4 view = view, -- name of the view to be executed |
jbe/bsw@0 | 5 id = id, -- id to be returned by param.get_id(...) during execution |
jbe/bsw@0 | 6 params = params -- parameters to be returned by param.get(...) during execution |
jbe/bsw@0 | 7 } |
jbe/bsw@0 | 8 |
jbe/bsw@0 | 9 Executes a view directly (without associated filters). |
jbe/bsw@0 | 10 |
jbe/bsw@0 | 11 --]]-- |
jbe/bsw@0 | 12 |
jbe/bsw@0 | 13 function execute.view(args) |
jbe/bsw@0 | 14 local module = args.module |
jbe/bsw@0 | 15 local view = args.view |
jbe/bsw@0 | 16 trace.enter_view{ module = module, view = view } |
jbe/bsw@0 | 17 execute.file_path{ |
jbe/bsw@0 | 18 file_path = encode.file_path( |
jbe/bsw@0 | 19 request.get_app_basepath(), |
jbe/bsw@0 | 20 'app', request.get_app_name(), module, view .. '.lua' |
jbe/bsw@0 | 21 ), |
jbe/bsw@0 | 22 id = args.id, |
jbe/bsw@0 | 23 params = args.params |
jbe/bsw@0 | 24 } |
jbe/bsw@0 | 25 trace.execution_return() |
jbe/bsw@0 | 26 end |