diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-11-21 19:29:47 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-11-21 19:29:47 +0000 |
commit | 69ac1031b7e83fb68ee1f6f952890fc0654f54f8 (patch) | |
tree | 4f220decbd7c7e9a796431db67079e9687dc372b /applications/luci-commands | |
parent | ef8e4eb991a1b496085c57f6b8381b623311db89 (diff) |
applications/luci-commands, applications/luci-upnp, modules/admin-core, modules/admin-full, modules/freifunk: clean up argument handling of leaf nodes
Diffstat (limited to 'applications/luci-commands')
-rw-r--r-- | applications/luci-commands/luasrc/controller/commands.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/applications/luci-commands/luasrc/controller/commands.lua b/applications/luci-commands/luasrc/controller/commands.lua index 9fbde94c6a..c04d186bb4 100644 --- a/applications/luci-commands/luasrc/controller/commands.lua +++ b/applications/luci-commands/luasrc/controller/commands.lua @@ -141,9 +141,7 @@ local function parse_args(str) end local function parse_cmdline(cmdid, args) - local uci = require "luci.model.uci".cursor() - local path = luci.dispatcher.context.requestpath - + local uci = require "luci.model.uci".cursor() if uci:get("luci", cmdid) == "command" then local cmd = uci:get_all("luci", cmdid) local argv = parse_args(cmd.command) @@ -228,7 +226,8 @@ end function action_public(cmdid, args) local uci = require "luci.model.uci".cursor() - if uci:get("luci", cmdid) == "command" and + if cmdid and + uci:get("luci", cmdid) == "command" and uci:get("luci", cmdid, "public") == "1" then action_download(cmdid, args) |