luci-mod-freifunk: replace calls to get_all() with separate get() calls
[project/luci.git] / modules / luci-mod-freifunk / luasrc / view / freifunk / adminindex.htm
index e0252ba8919cfc5ca234d9d9eaa7a6aa8f25c39e..a3f079716cb9273ff3733e1c52a2d3272ed749fc 100644 (file)
@@ -1,22 +1,15 @@
 <%+header%>
 <%
 local uci = require "luci.model.uci".cursor()
-local contact = uci:get_all("freifunk", "contact")
+local nickname = uci:get("freifunk", "contact", "nickname") or ""
+local name = uci:get("freifunk", "contact", "name") or ""
+local mail = uci:get("freifunk", "contact", "mail") or ""
 local contacturl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "contact")
 local hostname = uci:get_first ("system", "system", "hostname")
 local latitude = uci:get_first ("system", "system", "latitude")
 local longitude = uci:get_first ("system", "system", "longitude")
 local location = uci:get_first ("system", "system", "location")
 local basicsurl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "basics")
-local nickname, name, mail
-if not contact then
-       nickname, name, mail = ""
-else
-       nickname = contact.nickname
-       name = contact.name
-       mail = contact.mail
-end
-
 %>
 
 <h2><%:Freifunk Overview%></h2>