diff options
Diffstat (limited to 'applications/luci-splash/luasrc')
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> |