Skip to content

Commit

Permalink
Add posibility to pass args to called-functions in dispatcher
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.luci.subsignal.org/luci/trunk@3633 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
  • Loading branch information
Cyrus authored and Cyrus committed Oct 26, 2008
1 parent b8c653c commit a86eee9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libs/web/luasrc/dispatcher.lua
Expand Up @@ -469,7 +469,13 @@ end
-- @param ... Additional parameters passed to the function
function call(name, ...)
local argv = {...}
return function() return getfenv()[name](unpack(argv)) end
return function(...)
if #argv > 0 then
return getfenv()[name](unpack(argv), ...)
else
return getfenv()[name](...)
end
end
end

--- Create a template render dispatching target.
Expand Down

0 comments on commit a86eee9

Please sign in to comment.