Skip to content

Commit

Permalink
luci-mod-freifunk-ui: fix the list of community profiles
Browse files Browse the repository at this point in the history
The call to uci:get_first() was called with a full pathname
instead of a config name. This has been changed by adding a
string.gsub() substitution of the pathname with an empty string.

The changes are analagous to freifunk/openwrt-packages@d1e6af6#diff-cdca2c97e3ffc79e2bcbcf93b6638617

cherry-picked from 66384d1
  • Loading branch information
pmelange committed Jun 13, 2019
1 parent 321cd44 commit 5c1457c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ community.rmempty = false

local profile
for profile in fs.glob(profiles) do
local name = uci:get_first(profile, "community", "name") or "?"
community:value(string.gsub(profile, "/etc/config/profile_", ""), name)
profile = string.gsub(profile, "/etc/config/profile_", "")
local name = uci:get_first("profile_" .. profile, "community", "name") or "?"
community:value(profile, name)
end


Expand Down

0 comments on commit 5c1457c

Please sign in to comment.