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:
35360af
)
* luci/libs/core: Oops... forgot the boolean datatype in serialize_data()
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 26 Jul 2008 00:08:43 +0000
(
00:08
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 26 Jul 2008 00:08:43 +0000
(
00:08
+0000)
libs/core/luasrc/util.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/util.lua
b/libs/core/luasrc/util.lua
index 3f65a80fba6452ad5ae827bad866c6cddb3c14eb..2686445def272d26ecc1b50463b6c12563521e04 100644
(file)
--- a/
libs/core/luasrc/util.lua
+++ b/
libs/core/luasrc/util.lua
@@
-417,6
+417,8
@@
function serialize_data(val)
:gsub("\n", "\\n")
:gsub('"','\\"')
return '"' .. val .. '"'
+ elseif type(val) == "boolean" then
+ return val and "true" or "false"
elseif type(val) == "table" then
return "{ " .. _serialize_table(val) .. " }"
else