projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add posibility to pass args to called-functions in dispatcher
[project/luci.git]
/
libs
/
web
/
luasrc
/
dispatcher.lua
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index
d199d41
..
d58987a
100644
(file)
--- a/
libs/web/luasrc/dispatcher.lua
+++ b/
libs/web/luasrc/dispatcher.lua
@@
-469,7
+469,13
@@
end
-- @param ... Additional parameters passed to the function
function call(name, ...)
local argv = {...}
-- @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.
end
--- Create a template render dispatching target.