summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-08-27 17:51:35 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-08-27 17:51:35 +0000
commit339042c46a187567de3e19b6f383ed72ed007f7d (patch)
treeea8966ea9c9c2da7d41e6eae3d6b740e1edf8977
parent9a8eb7fce6bc02fea83bda0e355a4d001b825671 (diff)
* luci/libs: uvl: allow optional uci config as argument in validate_*()
-rw-r--r--libs/uvl/luasrc/uvl.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/uvl/luasrc/uvl.lua b/libs/uvl/luasrc/uvl.lua
index 560be3070..5cad3d20e 100644
--- a/libs/uvl/luasrc/uvl.lua
+++ b/libs/uvl/luasrc/uvl.lua
@@ -110,7 +110,7 @@ end
-- @param config Name of the configuration to validate
-- @return Boolean indicating whether the given config validates
-- @return String containing the reason for errors (if any)
-function UVL.validate_config( self, config )
+function UVL.validate_config( self, config, uci )
if not self.packages[config] then
local ok, err = self:read_scheme(config)
@@ -119,7 +119,7 @@ function UVL.validate_config( self, config )
end
end
- local co = luci.uvl.config( self, config )
+ local co = luci.uvl.config( self, uci or config, uci and config )
local sc = { }
self.beenthere = { }
@@ -173,7 +173,7 @@ end
-- @param section Name of the section to validate
-- @return Boolean indicating whether the given config validates
-- @return String containing the reason for errors (if any)
-function UVL.validate_section( self, config, section )
+function UVL.validate_section( self, config, section, uci )
if not self.packages[config] then
local ok, err = self:read_scheme( config )
@@ -182,7 +182,7 @@ function UVL.validate_section( self, config, section )
end
end
- local co = luci.uvl.config( self, config )
+ local co = luci.uvl.config( self, uci or config, uci and config )
local so = co:section( section )
self.beenthere = { }
@@ -204,7 +204,7 @@ end
-- @param option Name of the option to validate
-- @return Boolean indicating whether the given config validates
-- @return String containing the reason for errors (if any)
-function UVL.validate_option( self, config, section, option )
+function UVL.validate_option( self, config, section, option, uci )
if not self.packages[config] then
local ok, err = self:read_scheme( config )
@@ -213,7 +213,7 @@ function UVL.validate_option( self, config, section, option )
end
end
- local co = luci.uvl.config( self, config )
+ local co = luci.uvl.config( self, uci or config, uci and config )
local so = co:section( section )
local oo = so:option( option )