luci-mod-freifunk: fix the list of community profiles 2451/head
authorpmelange <isprotejesvalkata@gmail.com>
Fri, 11 Jan 2019 12:29:48 +0000 (13:29 +0100)
committerpmelange <isprotejesvalkata@gmail.com>
Fri, 11 Jan 2019 13:00:15 +0000 (14:00 +0100)
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua

index b08366de6c737c58d35dbd9bb867d959c1cc663b..eb0b49b11c9294b5bcea2ffe3cc72b25a9dacd8b 100644 (file)
@@ -15,7 +15,7 @@ community.rmempty = false
 
 local profile
 for profile in fs.glob(profiles) do
-       local name = uci:get_first(profile, "community", "name") or "?"
+       local name = uci:get_first(string.gsub(profile, "/etc/config/", ""), "community", "name") or "?"
        community:value(string.gsub(profile, "/etc/config/profile_", ""), name)
 end