Software /
code /
prosody
Comparison
util/dataforms.lua @ 6467:77d00a895bbd
util/dataforms: Make sure we iterate over field tags
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Tue, 07 Oct 2014 12:08:23 -0400 |
parent | 6148:7dcd6f124c93 |
child | 6468:3728c30da4e3 |
comparison
equal
deleted
inserted
replaced
6466:6e67c73f730c | 6467:77d00a895bbd |
---|---|
119 local data = {}; | 119 local data = {}; |
120 local errors = {}; | 120 local errors = {}; |
121 | 121 |
122 for _, field in ipairs(layout) do | 122 for _, field in ipairs(layout) do |
123 local tag; | 123 local tag; |
124 for field_tag in stanza:childtags() do | 124 for field_tag in stanza:childtags("field") do |
125 if field.name == field_tag.attr.var then | 125 if field.name == field_tag.attr.var then |
126 tag = field_tag; | 126 tag = field_tag; |
127 break; | 127 break; |
128 end | 128 end |
129 end | 129 end |