* luci/libs/uvl: allow empty strings or undefined options as booleans too

This commit is contained in:
Jo-Philipp Wich 2008-09-09 16:28:19 +00:00
parent 0345180f72
commit 77432eb047

View file

@ -29,6 +29,8 @@ function boolean( val )
return true
elseif val == "0" or val == "no" or val == "off" or val == "false" then
return true
elseif val == "" or val == nil then
return true
end
return false