* luci/libs/uvl:

- only check option dependencies if option has a value
	- remove option required for atheros mode in wireless scheme - breaks broadcom
* luci/model/admin-full:
	- override section validation if we create a new network on demand
This commit is contained in:
Jo-Philipp Wich 2008-09-13 04:26:37 +00:00
parent e898a0dec6
commit a8d165a5bf
3 changed files with 41 additions and 39 deletions

View file

@ -334,7 +334,6 @@ function UVL._validate_option( self, option, nodeps )
return false, option:error(ERR.OPT_DATATYPE(option, dt))
end
end
end
if not nodeps then
local ok, err = dependencies.check( self, option )
@ -342,6 +341,7 @@ function UVL._validate_option( self, option, nodeps )
option:error(err)
end
end
end
local ok, err = validation.check( self, option )
if not ok and STRICT_EXTERNAL_VALIDATORS then

View file

@ -31,7 +31,6 @@ config variable
option name 'mode'
option section 'wireless.wifi-device'
option title 'Mode (atheros)'
option required true
option type enum
list depends type=atheros

View file

@ -119,6 +119,9 @@ luci.tools.webadmin.cbi_add_networks(network)
function network.write(self, section, value)
if not m.uci:get("network", value) then
-- avoid "value not defined in enum" because network is not known yet
s.override_scheme = true
m:chain("network")
m.uci:set("network", value, "interface")
Value.write(self, section, value)