From e75bdcefeef9a591b20d68bf8da18913b9117e6e Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Tue, 12 Jun 2012 18:29:58 +0200 Subject: util.dataforms: Fix parsing of -multi fields --- util/dataforms.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'util/dataforms.lua') diff --git a/util/dataforms.lua b/util/dataforms.lua index 8cb39144..55bad998 100644 --- a/util/dataforms.lua +++ b/util/dataforms.lua @@ -185,7 +185,7 @@ field_readers["list-multi"] = function (field_tag, required) local result = {}; for value in field_tag:childtags("value") do - result[#result+1] = value; + result[#result+1] = value:get_text(); end return result, (required and #result == 0 and "Required value missing" or nil); end @@ -202,10 +202,10 @@ field_readers["text-multi"] = field_readers["list-single"] = field_readers["text-single"]; - local boolean_values = { - ["1"] = true, ["true"] = true, - ["0"] = false, ["false"] = false, - }; +local boolean_values = { + ["1"] = true, ["true"] = true, + ["0"] = false, ["false"] = false, +}; field_readers["boolean"] = function (field_tag, required) -- cgit v1.2.3