Changeset

2221:7ddd24d8260c

Merge with trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 25 Nov 2009 19:59:16 +0000
parents 2220:98a880fda813 (diff) 2218:b94bb1334029 (current diff)
children 2223:458da843020f
files
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/dataforms.lua	Thu Nov 26 00:05:18 2009 +0500
+++ b/util/dataforms.lua	Wed Nov 25 19:59:16 2009 +0000
@@ -93,7 +93,13 @@
 	local data = {};
 	
 	for field_tag in stanza:childtags() do
-		local field_type = field_tag.attr.type;
+		local field_type;
+		for n, field in ipairs(layout) do
+			if field.name == field_tag.attr.var then
+				field_type = field.type;
+				break;
+			end
+		end
 		
 		local reader = field_readers[field_type];
 		if reader then