* Merged Luci to use native UCI-library
[project/luci.git] / applications / luci-splash / luasrc / model / cbi / splash / splash.lua
index 6050ac8..a14a38c 100644 (file)
@@ -11,11 +11,12 @@ s.addremove = true
 s.anonymous = true
 
 iface = s:option(ListValue, "network", "Schnittstelle")
-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)
 
 s = m:section(TypedSection, "whitelist", "Automatische Freigabe")
 s.addremove = true