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-upnp/luasrc/controller | |
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-upnp/luasrc/controller')
-rw-r--r-- | applications/luci-upnp/luasrc/controller/upnp.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/applications/luci-upnp/luasrc/controller/upnp.lua b/applications/luci-upnp/luasrc/controller/upnp.lua index c40493dab6..b5eaad5c90 100644 --- a/applications/luci-upnp/luasrc/controller/upnp.lua +++ b/applications/luci-upnp/luasrc/controller/upnp.lua @@ -69,10 +69,8 @@ function act_status() end end -function act_delete() - local path = luci.dispatcher.context.requestpath - local idx = tonumber(path[#path]) - +function act_delete(idx) + idx = tonumber(idx) if idx and idx > 0 then luci.sys.call("iptables -t filter -D MINIUPNPD %d 2>/dev/null" % idx) luci.sys.call("iptables -t nat -D MINIUPNPD %d 2>/dev/null" % idx) |