aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-25 19:58:58 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-25 19:58:58 +0000
commit991fde2f8d36a1b9a42f35c9146650da4ed024e2 (patch)
treeff3dacf12f0c97356433819ef077a1f5896992c1 /util
parent212ef3eca2cb953331e3d41d07c37b2812e6e0b9 (diff)
parent22d8917d8ced0783831e0050e1f0ca4089e273e8 (diff)
downloadprosody-991fde2f8d36a1b9a42f35c9146650da4ed024e2.tar.gz
prosody-991fde2f8d36a1b9a42f35c9146650da4ed024e2.zip
Merge with 0.6
Diffstat (limited to 'util')
-rw-r--r--util/dataforms.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua
index 5626172e..a3bde8ca 100644
--- a/util/dataforms.lua
+++ b/util/dataforms.lua
@@ -93,7 +93,13 @@ function form_t.data(layout, stanza)
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