summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-core/luasrc/tools
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-17 10:20:36 +0000
committerSteven Barth <steven@midlink.org>2008-08-17 10:20:36 +0000
commit75d4cca7ae10a39d9787afd5f1c2f14800491acd (patch)
treed78aa1fec1690510ed723f6c8433f71fda709e28 /modules/admin-core/luasrc/tools
parent746fa9df8f3d3443d82cd26d6717e7b5cf3dc8c1 (diff)
Fixed a design flaw in luci.model.uci
Diffstat (limited to 'modules/admin-core/luasrc/tools')
-rw-r--r--modules/admin-core/luasrc/tools/webadmin.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/admin-core/luasrc/tools/webadmin.lua b/modules/admin-core/luasrc/tools/webadmin.lua
index 0f7612ff7..fe725d42d 100644
--- a/modules/admin-core/luasrc/tools/webadmin.lua
+++ b/modules/admin-core/luasrc/tools/webadmin.lua
@@ -57,10 +57,11 @@ function date_format(secs)
end
function network_get_addresses(net)
+ luci.model.uci.load_state("network")
local addr = {}
- local ipv4 = luci.model.uci.get_statevalue("network", net, "ipaddr")
- local mav4 = luci.model.uci.get_statevalue("network", net, "netmask")
- local ipv6 = luci.model.uci.get_statevalue("network", net, "ip6addr")
+ local ipv4 = luci.model.uci.get("network", net, "ipaddr")
+ local mav4 = luci.model.uci.get("network", net, "netmask")
+ local ipv6 = luci.model.uci.get("network", net, "ip6addr")
if ipv4 and mav4 then
ipv4 = luci.ip.IPv4(ipv4, mav4)
@@ -113,7 +114,7 @@ function cbi_add_knownips(field)
end
function network_get_zones(net)
- if not luci.model.uci.load("firewall") then
+ if not luci.model.uci.load_state("firewall") then
return nil
end
@@ -146,11 +147,12 @@ function firewall_find_zone(name)
end
function iface_get_network(iface)
+ luci.model.uci.load_state("network")
local net
luci.model.uci.foreach("network", "interface",
function (section)
- local ifname = luci.model.uci.get_statevalue(
+ local ifname = luci.model.uci.get(
"network", section[".name"], "ifname"
)