projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b94b36
)
libs/core: bring get_first() boolean casting in line with get_bool()
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 24 Dec 2010 21:39:26 +0000
(21:39 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 24 Dec 2010 21:39:26 +0000
(21:39 +0000)
libs/core/luasrc/model/uci.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/model/uci.lua
b/libs/core/luasrc/model/uci.lua
index 270877677f2487a2cb0d21c8b2b0f681664c1d49..e42856bd50c2d351e499a7443fac119efcd54b06 100644
(file)
--- a/
libs/core/luasrc/model/uci.lua
+++ b/
libs/core/luasrc/model/uci.lua
@@
-184,7
+184,8
@@
function Cursor.get_first(self, conf, stype, opt, def)
if type(def) == "number" then
val = tonumber(val)
elseif type(def) == "boolean" then
- val = (val == "1" or val == "true" or val == "enabled")
+ val = (val == "1" or val == "true" or
+ val == "yes" or val == "on")
end
if val ~= nil then