summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-splash/luasrc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-26 23:00:44 +0000
committerSteven Barth <steven@midlink.org>2008-08-26 23:00:44 +0000
commit91ba7c42f5b45614c9f4c803d09399f08a8e27b1 (patch)
tree21d1e1d67b3bee82eb123c0c5dbb274f2fcb6b59 /applications/luci-splash/luasrc
parent43b3217e5595acc91ff6d7614a5c21c88696fbcc (diff)
UCI API changes
Diffstat (limited to 'applications/luci-splash/luasrc')
-rw-r--r--applications/luci-splash/luasrc/controller/splash/splash.lua2
-rw-r--r--applications/luci-splash/luasrc/model/cbi/splash/splash.lua8
-rw-r--r--applications/luci-splash/luasrc/view/splash/splash.htm2
3 files changed, 7 insertions, 5 deletions
diff --git a/applications/luci-splash/luasrc/controller/splash/splash.lua b/applications/luci-splash/luasrc/controller/splash/splash.lua
index dbd266f46..b046ff409 100644
--- a/applications/luci-splash/luasrc/controller/splash/splash.lua
+++ b/applications/luci-splash/luasrc/controller/splash/splash.lua
@@ -22,7 +22,7 @@ function action_activate()
local mac = luci.sys.net.ip4mac(luci.http.getenv("REMOTE_ADDR"))
if mac and luci.http.formvalue("accept") then
os.execute("luci-splash add "..mac.." >/dev/null 2>&1")
- luci.http.redirect(luci.model.uci.get("freifunk", "community", "homepage"))
+ luci.http.redirect(luci.model.uci.cursor():get("freifunk", "community", "homepage"))
else
luci.http.redirect(luci.dispatcher.build_url())
end
diff --git a/applications/luci-splash/luasrc/model/cbi/splash/splash.lua b/applications/luci-splash/luasrc/model/cbi/splash/splash.lua
index 49257f1ba..29bc6d9ab 100644
--- a/applications/luci-splash/luasrc/model/cbi/splash/splash.lua
+++ b/applications/luci-splash/luasrc/model/cbi/splash/splash.lua
@@ -11,21 +11,23 @@ s.template = "cbi/tblsection"
s.addremove = true
s.anonymous = true
+local uci = luci.model.uci.cursor()
+
zone = s:option(ListValue, "zone", "Firewallzone")
-luci.model.uci.foreach("firewall", "zone",
+uci:foreach("firewall", "zone",
function (section)
zone:value(section.name)
end)
iface = s:option(ListValue, "network", "Netzwerk")
-luci.model.uci.foreach("network", "interface",
+uci:foreach("network", "interface",
function (section)
if section[".name"] ~= "loopback" then
iface:value(section[".name"])
end
end)
-luci.model.uci.foreach("network", "alias",
+uci:foreach("network", "alias",
function (section)
iface:value(section[".name"])
end)
diff --git a/applications/luci-splash/luasrc/view/splash/splash.htm b/applications/luci-splash/luasrc/view/splash/splash.htm
index 1988224d7..28a038409 100644
--- a/applications/luci-splash/luasrc/view/splash/splash.htm
+++ b/applications/luci-splash/luasrc/view/splash/splash.htm
@@ -12,7 +12,7 @@ You may obtain a copy of the License at
$Id$
-%>
-<% local c = luci.model.uci.get_all("freifunk", "community") %>
+<% local c = luci.model.uci.cursor():get_all("freifunk", "community") %>
<h1>Willkommen!</h1>
<p>