projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22c9276
)
Tuned dispatcher behaviour
author
Steven Barth
<steven@midlink.org>
Mon, 15 Sep 2008 16:50:55 +0000
(16:50 +0000)
committer
Steven Barth
<steven@midlink.org>
Mon, 15 Sep 2008 16:50:55 +0000
(16:50 +0000)
libs/web/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index 12093fe7a43f0f6e384db46233e7ee174303d802..8e8e19063b8e1149890c3ff608a0ac5f0e44c34f 100644
(file)
--- 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