modules/freifunk: fix basics cbi model
This commit is contained in:
parent
7f26be3628
commit
5ef1485133
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
||||||
local fs = require "nixio.fs"
|
local fs = require "nixio.fs"
|
||||||
local util = require "luci.util"
|
local util = require "luci.util"
|
||||||
local uci = require "luci.model.uci".cursor()
|
local uci = require "luci.model.uci".cursor()
|
||||||
local profiles = "/etc/config/profile_"
|
local profiles = "/etc/config/profile_*"
|
||||||
|
|
||||||
m = Map("freifunk", translate ("Community"))
|
m = Map("freifunk", translate ("Community"))
|
||||||
c = m:section(NamedSection, "community", "public", nil, translate("These are the basic settings for your local wireless community. These settings define the default values for the wizard and DO NOT affect the actual configuration of the router."))
|
c = m:section(NamedSection, "community", "public", nil, translate("These are the basic settings for your local wireless community. These settings define the default values for the wizard and DO NOT affect the actual configuration of the router."))
|
||||||
|
@ -14,7 +14,7 @@ community = c:option(ListValue, "name", translate ("Community"))
|
||||||
community.rmempty = false
|
community.rmempty = false
|
||||||
|
|
||||||
local profile
|
local profile
|
||||||
for profile in fs.dir(profiles) do
|
for profile in fs.glob(profiles) do
|
||||||
local name = uci:get_first(profile, "community", "name") or "?"
|
local name = uci:get_first(profile, "community", "name") or "?"
|
||||||
community:value(profile, name)
|
community:value(profile, name)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue