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:
0345180
)
* luci/libs/uvl: allow empty strings or undefined options as booleans too
author
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 9 Sep 2008 16:28:19 +0000
(16:28 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 9 Sep 2008 16:28:19 +0000
(16:28 +0000)
libs/uvl/luasrc/uvl/datatypes.lua
patch
|
blob
|
history
diff --git
a/libs/uvl/luasrc/uvl/datatypes.lua
b/libs/uvl/luasrc/uvl/datatypes.lua
index 971bb9d75cecad0b4a2e2b4778ecc8cfd7c3e792..fc37fa3c6989dfa378760f4f8fc225aa4e7bc9fb 100644
(file)
--- a/
libs/uvl/luasrc/uvl/datatypes.lua
+++ b/
libs/uvl/luasrc/uvl/datatypes.lua
@@
-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