webmcp
diff framework/env/execute/action.lua @ 0:9fdfb27f8e67
Version 1.0.0
author | jbe/bsw |
---|---|
date | Sun Oct 25 12:00:00 2009 +0100 (2009-10-25) |
parents | |
children | eb3e236d261d |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/framework/env/execute/action.lua Sun Oct 25 12:00:00 2009 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +--[[-- 1.5 +action_status = -- status code returned by the action (a string) 1.6 +execute.action{ 1.7 + module = module, -- module name of the action to be executed 1.8 + action = action, -- name of the action to be executed 1.9 + id = id, -- id to be returned by param.get_id(...) during execution 1.10 + params = params -- parameters to be returned by param.get(...) during execution 1.11 +} 1.12 + 1.13 +Executes an action without associated filters. 1.14 +This function is only used by execute.filtered_action{...}, which itself is only used by the webmcp.lua file in the cgi-bin/ directory. 1.15 + 1.16 +--]]-- 1.17 + 1.18 +function execute.action(args) 1.19 + local module = args.module 1.20 + local action = args.action 1.21 + trace.enter_action{ module = module, action = action } 1.22 + local action_status = execute.file_path{ 1.23 + file_path = encode.file_path( 1.24 + request.get_app_basepath(), 1.25 + 'app', request.get_app_name(), module, '_action', action .. '.lua' 1.26 + ), 1.27 + id = args.id, 1.28 + params = args.params 1.29 + } 1.30 + trace.execution_return{ status = action_status } 1.31 + return action_status 1.32 +end