summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/dispatcher.lua
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-09-15 16:50:55 +0000
committerSteven Barth <steven@midlink.org>2008-09-15 16:50:55 +0000
commitdc33ed7b570144f5269151e5df218a7a3a37b52a (patch)
tree59b87ff2844b7925a7e103f324ab36f0100306ae /libs/web/luasrc/dispatcher.lua
parent22c927621c18e384f3f79e53aedda53271d52de2 (diff)
Tuned dispatcher behaviour
Diffstat (limited to 'libs/web/luasrc/dispatcher.lua')
-rw-r--r--libs/web/luasrc/dispatcher.lua13
1 files changed, 2 insertions, 11 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua
index 12093fe7a..8e8e19063 100644
--- a/libs/web/luasrc/dispatcher.lua
+++ b/libs/web/luasrc/dispatcher.lua
@@ -352,17 +352,8 @@ function assign(path, clone, title, order)
obj.title = title
obj.order = order
-
- local c = context.tree
- for k, v in ipairs(clone) do
- if not c.nodes[v] then
- c.nodes[v] = {nodes={}}
- end
- c = c.nodes[v]
- end
-
- setmetatable(obj, {__index = c})
+ setmetatable(obj, {__index = _create_node(clone)})
return obj
end
@@ -388,7 +379,7 @@ end
-- @param ... Virtual path
-- @return Dispatching tree node
function node(...)
- local c = _create_node(arg)
+ local c = _create_node({...})
c.module = getfenv(2)._NAME
c.path = arg