From f5919a990f0ce92b3a8b245417df1fafcc3b745c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 22 Jul 2019 16:48:35 +0200 Subject: luci-base: remove accidentally committed code Signed-off-by: Jo-Philipp Wich --- modules/luci-base/root/usr/libexec/rpcd/luci | 58 ---------------------------- 1 file changed, 58 deletions(-) (limited to 'modules/luci-base/root/usr/libexec/rpcd') diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci index c446b19e92..7644745efd 100755 --- a/modules/luci-base/root/usr/libexec/rpcd/luci +++ b/modules/luci-base/root/usr/libexec/rpcd/luci @@ -320,64 +320,6 @@ local methods = { return { helpers = rv } end - }, - - getMenuItems = { - call = function(args) - local util = require "luci.util" - local http = require "luci.http" - local disp = require "luci.dispatcher" - - local x = coroutine.create(function() - util.coxpcall(function() - http.context.request = http.Request({ - PATH_INFO = "/", - QUERY_STRING = "", - REQUEST_METHOD = "GET", - REQUEST_URI = "/", - BUILD_MENU = "1" - }, function() end, function() end) - - disp.context.request = {} - disp.dispatch(disp.context.request) - - coroutine.yield(-1, disp.node()) - end, error) - end) - - local root = nil - - while coroutine.status(x) ~= "dead" do - local res, id, data1, data2 = coroutine.resume(x, r) - if id == -1 then - root = data1 - elseif id == 6 then - data1:close() - end - end - - local function recurse(prefix, node) - local childs = disp.node_childs(node) - if #childs > 0 then - local i, c - for i, c in ipairs(childs) do - local cnode = node.nodes[c] - local n = { name = c, title = cnode.title, query = cnode.query } - - if prefix.children then - prefix.children[#prefix.children+1] = n - else - prefix.children = { n } - end - - recurse(n, cnode) - end - end - return prefix - end - - return root and recurse({}, root) or {} - end } } -- cgit v1.2.3