summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm
diff options
context:
space:
mode:
authorpmelange <isprotejesvalkata@gmail.com>2019-01-11 12:54:55 +0100
committerpmelange <isprotejesvalkata@gmail.com>2019-01-11 12:57:52 +0100
commitd4562ff54461cfb39320af22478e33a13f480fee (patch)
tree22958558c7e524bf9a4b3032fa7c25e8db128273 /modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm
parente3fa766b587a1f8574a0aa979b9e41d9770b38e5 (diff)
luci-mod-freifunk: replace calls to get_all() with separate get() calls
The get_all() function has changed and how it was used before no longer works properly. These changes not only change to individual get() calls, but actually adds to the readability of the code and reduces file size. Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
Diffstat (limited to 'modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm')
-rw-r--r--modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm13
1 files changed, 3 insertions, 10 deletions
diff --git a/modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm b/modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm
index e0252ba891..a3f079716c 100644
--- a/modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm
+++ b/modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm
@@ -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>