* luci/libs/core: Oops... forgot the boolean datatype in serialize_data()
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 26 Jul 2008 00:08:43 +0000 (00:08 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 26 Jul 2008 00:08:43 +0000 (00:08 +0000)
libs/core/luasrc/util.lua

index 3f65a80..2686445 100644 (file)
@@ -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