luci-0.11: merge outstanding trunk changes
[project/luci.git] / applications / luci-upnp / luasrc / controller / upnp.lua
index c40493dab6c3e06b2b220b1e0e6178040c098b22..7acd029a5f0b54ce43db5c5823605d259108f993 100644 (file)
@@ -23,11 +23,9 @@ function index()
        local page
 
        page = entry({"admin", "services", "upnp"}, cbi("upnp/upnp"), _("UPNP"))
-       page.i18n = "upnp"
        page.dependent = true
 
        page = entry({"mini", "network", "upnp"}, cbi("upnp/upnpmini", {autoapply=true}), _("UPNP"))
-       page.i18n = "upnp"
        page.dependent = true
 
        entry({"admin", "services", "upnp", "status"}, call("act_status")).leaf = true
@@ -69,10 +67,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)