libs/web: Added luci.web.dispatcher.registered

This commit is contained in:
Steven Barth 2008-07-16 07:26:36 +00:00
parent ced11a4a13
commit 3ca2844c9f

View file

@ -324,6 +324,20 @@ function entry(path, target, title, order)
return c
end
-- Checks whether a node exists
function registered(...)
local c = context.tree
for k,v in ipairs(arg) do
if not c.nodes[v] then
return false
end
c = c.nodes[v]
end
return true
end
-- Fetch a dispatching node
function node(...)
local c = context.tree