diff options
author | Sven Roederer <freifunk@it-solutions.geroedel.de> | 2016-04-24 22:38:26 +0200 |
---|---|---|
committer | Sven Roederer <freifunk@it-solutions.geroedel.de> | 2016-04-28 02:41:35 +0200 |
commit | 61c7157a66b4bbce7d110cc0de8164bd2bd57798 (patch) | |
tree | f4ac671864be67c49cb883d45cb03e28ac2df483 /modules/luci-mod-freifunk | |
parent | 91511033564929af41fa1f57bccde7fbcb7f5620 (diff) |
luci-mod-freifunk: fix lookup of community-name
restore the lookup of the freifunk community-name stored in
uci "freifunk.community.name".
In https://github.com/openwrt/luci/commit/9780ee382e72f8a5fb69e337a3fcc51fc0914883
the value changed to the complete path of the community-profile, e.g.
"/etc/config/profile_berlin". This causes lookup problems on other
pages, like "mod-freifunk -> overview -> index" (view/freifunk/index.htm line37, line 54).
And as the option suggests it's the community-name not the community-profile path.
Signed-off-by: Sven Roederer devel-sven@geroedel.de
Diffstat (limited to 'modules/luci-mod-freifunk')
-rw-r--r-- | modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua b/modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua index 0d3d971c30..b08366de6c 100644 --- a/modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua +++ b/modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua @@ -16,7 +16,7 @@ community.rmempty = false local profile for profile in fs.glob(profiles) do local name = uci:get_first(profile, "community", "name") or "?" - community:value(profile, name) + community:value(string.gsub(profile, "/etc/config/profile_", ""), name) end |