Changeset

4928:5211c11dd865

util.dataforms: Fix parsing of -multi fields
author Florian Zeitz <florob@babelmonkeys.de>
date Tue, 12 Jun 2012 18:29:58 +0200
parents 4926:58714123f600
children 4929:15c1b8aa123d 4933:630cb694b364
files util/dataforms.lua
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/util/dataforms.lua	Tue Jun 12 14:29:04 2012 +0200
+++ b/util/dataforms.lua	Tue Jun 12 18:29:58 2012 +0200
@@ -185,7 +185,7 @@
 	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["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)