Merge pull request #1686 from dibdot/wifischedule

luci-app-wifischedule: fix function calls
This commit is contained in:
Dirk Brenken 2018-03-16 06:37:08 +01:00 committed by GitHub
commit 7656f51c82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,7 @@
local fs = require "nixio.fs" local fs = require "nixio.fs"
local sys = require "luci.sys" local sys = require "luci.sys"
local uci = require("luci.model.uci").cursor()
function time_validator(self, value, desc) function time_validator(self, value, desc)
if value ~= nil then if value ~= nil then
@ -110,7 +111,7 @@ modules.wrap = "off"
modules.rows = 10 modules.rows = 10
function modules.cfgvalue(self, section) function modules.cfgvalue(self, section)
mod = uci.get("wifi_schedule", section, "modules") mod = uci:get("wifi_schedule", section, "modules")
if mod == nil then if mod == nil then
mod = "" mod = ""
end end
@ -121,7 +122,7 @@ function modules.write(self, section, value)
if value then if value then
value_list = value:gsub("\r\n", " ") value_list = value:gsub("\r\n", " ")
ListValue.write(self, section, value_list) ListValue.write(self, section, value_list)
uci.set("wifi_schedule", section, "modules", value_list) uci:set("wifi_schedule", section, "modules", value_list)
end end
end end
-- END Modules -- END Modules