* Removed section titles
[project/luci.git] / applications / luci-fw / luasrc / model / cbi / luci_fw / portfw.lua
index e4f4fa2..3923886 100644 (file)
@@ -3,18 +3,19 @@ require("luci.sys")
 m = Map("luci_fw", "Portweiterleitung", [[Portweiterleitungen ermöglichen es interne
 Netzwerkdienste von einem anderen externen Netzwerk aus erreichbar zu machen.]])
 
-s = m:section(TypedSection, "portfw")
+s = m:section(TypedSection, "portfw", "")
 s.template  = "cbi/tblsection"
 s.addremove = true
 s.anonymous = true
 
 iface = s:option(ListValue, "iface", "Schnittstelle", "Externe Schnittstelle")
 iface.default = "wan"
-for k, v in pairs(luci.model.uci.sections("network")) do
-       if v[".type"] == "interface" and k ~= "loopback" then
-               iface:value(k)
-       end
-end
+luci.model.uci.foreach("network", "interface",
+       function (section)
+               if section[".name"] ~= "loopback" then
+                       iface:value(section[".name"])
+               end
+       end)
 
 proto = s:option(ListValue, "proto", "Protokoll")
 proto:value("tcp", "TCP")