mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
util.dataforms: Fix parsing of -multi fields
This commit is contained in:
parent
f76c2aa90b
commit
49d3586dc1
1 changed files with 5 additions and 5 deletions
|
@ -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 = {
|
||||
local boolean_values = {
|
||||
["1"] = true, ["true"] = true,
|
||||
["0"] = false, ["false"] = false,
|
||||
};
|
||||
};
|
||||
|
||||
field_readers["boolean"] =
|
||||
function (field_tag, required)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue