* 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 3f65a80fba6452ad5ae827bad866c6cddb3c14eb..2686445def272d26ecc1b50463b6c12563521e04 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