projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
253a61a
)
Add posibility to pass args to called-functions in dispatcher
author
Steven Barth
<steven@midlink.org>
Sun, 26 Oct 2008 18:55:54 +0000
(18:55 +0000)
committer
Steven Barth
<steven@midlink.org>
Sun, 26 Oct 2008 18:55:54 +0000
(18:55 +0000)
libs/web/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index d199d41e4c951332e0cbd75162784120f2131acd..d58987a3f2f4a5ec394f1bd73646e428c8e2da3f 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 = {...}
- 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.