summaryrefslogtreecommitdiffhomepage
path: root/modules/niu/luasrc/model
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-11-14 19:24:12 +0000
committerSteven Barth <steven@midlink.org>2009-11-14 19:24:12 +0000
commit2bfa17e6f415a5d99a2f65dc37e4b8ceac1c3b6a (patch)
tree2cbaeb8d3612276695a60b32d661f2018af7117d /modules/niu/luasrc/model
parent319f820388d2a6e634053b7e11104e8755d4d498 (diff)
NIU:
Initial wireless DDNS: Show current address only if domain name is saved Minor tweaks
Diffstat (limited to 'modules/niu/luasrc/model')
-rw-r--r--modules/niu/luasrc/model/cbi/niu/network/ddns1.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/niu/luasrc/model/cbi/niu/network/ddns1.lua b/modules/niu/luasrc/model/cbi/niu/network/ddns1.lua
index 497a9c0256..5fb74ac2e7 100644
--- a/modules/niu/luasrc/model/cbi/niu/network/ddns1.lua
+++ b/modules/niu/luasrc/model/cbi/niu/network/ddns1.lua
@@ -40,6 +40,13 @@ pw.password = true
local dom = s:taboption("general", Value, "domain", translate("Hostname"))
local current = s:taboption("general", DummyValue, "_current", "Current IP-Address")
+
+function current.render(self, section, ...)
+ if dom:cfgvalue(section) then
+ return DummyValue.render(self, section, ...)
+ end
+end
+
function current.value(self, section)
local dns = nxo.getaddrinfo(dom:cfgvalue(section))
if dns then