luci-lua-runtime: dispatcher.lua: translate legacy node "target" property
Some legacy Lua controllers declare menu entries by first invoking `node()` and then setting the `.target` property on the resulting object. Make sure to properly translate such menu nodes into the internal menu JSON representation. Fixes: #6090 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
73aca68b9e
commit
1da816ddf2
1 changed files with 5 additions and 0 deletions
|
@ -186,6 +186,11 @@ function process_lua_controller(path)
|
|||
entry.auth = {}
|
||||
end
|
||||
|
||||
if entry.action == nil and type(entry.target) == "table" then
|
||||
entry.action = entry.target
|
||||
entry.target = nil
|
||||
end
|
||||
|
||||
entry.leaf = nil
|
||||
|
||||
entry.file_depends = nil
|
||||
|
|
Loading…
Reference in a new issue