projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
* luci/libs/core: Oops... forgot the boolean datatype in serialize_data()
[project/luci.git]
/
libs
/
core
/
luasrc
/
util.lua
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