summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/dispatcher.lua
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-02-26 17:08:41 +0000
committerSteven Barth <steven@midlink.org>2009-02-26 17:08:41 +0000
commit30421d38dd004a8c1e149e40af2019cbbc4c8bd6 (patch)
tree4fbedf0cb1b8aed7416824ba6b610475c3491444 /libs/web/luasrc/dispatcher.lua
parent3b7bb9c82fa2b02a8200fd2c77c5539081180086 (diff)
Introduce luci.dispatcher.get(...) which works like node(...) but does
not disable the autocreated flag and does not overwrite the target controller so that call()-targets won't loose their binding to their controller
Diffstat (limited to 'libs/web/luasrc/dispatcher.lua')
-rw-r--r--libs/web/luasrc/dispatcher.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua
index 6914ffb43e..60d468e86d 100644
--- a/libs/web/luasrc/dispatcher.lua
+++ b/libs/web/luasrc/dispatcher.lua
@@ -513,6 +513,14 @@ function entry(path, target, title, order)
return c
end
+--- Fetch or create a dispatching node without setting the target module or
+-- enabling the node.
+-- @param ... Virtual path
+-- @return Dispatching tree node
+function get(...)
+ return _create_node({...})
+end
+
--- Fetch or create a new dispatching node.
-- @param ... Virtual path
-- @return Dispatching tree node