summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-10-26 18:55:54 +0000
committerSteven Barth <steven@midlink.org>2008-10-26 18:55:54 +0000
commit511b573c9513f7ba9d01d4532d0af0695b578758 (patch)
tree8dca63a5033946e84931967f967365e17b3a2aab /libs
parent253a61ad8005a12f8b2406bef0d5bf152779b0fc (diff)
Add posibility to pass args to called-functions in dispatcher
Diffstat (limited to 'libs')
-rw-r--r--libs/web/luasrc/dispatcher.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua
index d199d41e4c..d58987a3f2 100644
--- 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.