diff options
author | Steven Barth <steven@midlink.org> | 2008-10-26 18:55:54 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-10-26 18:55:54 +0000 |
commit | 511b573c9513f7ba9d01d4532d0af0695b578758 (patch) | |
tree | 8dca63a5033946e84931967f967365e17b3a2aab /libs/web | |
parent | 253a61ad8005a12f8b2406bef0d5bf152779b0fc (diff) |
Add posibility to pass args to called-functions in dispatcher
Diffstat (limited to 'libs/web')
-rw-r--r-- | libs/web/luasrc/dispatcher.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua index d199d41e4..d58987a3f 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. |