projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9a8eb7f
)
* luci/libs: uvl: allow optional uci config as argument in validate_*()
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 27 Aug 2008 17:51:35 +0000
(17:51 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 27 Aug 2008 17:51:35 +0000
(17:51 +0000)
libs/uvl/luasrc/uvl.lua
patch
|
blob
|
history
diff --git
a/libs/uvl/luasrc/uvl.lua
b/libs/uvl/luasrc/uvl.lua
index
560be30
..
5cad3d2
100644
(file)
--- 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)
-- @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)
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
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 = { }
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)
-- @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 )
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
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 = { }
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)
-- @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 )
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
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 )
local so = co:section( section )
local oo = so:option( option )