Changeset

5695:460070c84eae

Merge the merge
author Matthew Wild <mwild1@gmail.com>
date Thu, 13 Jun 2013 23:24:36 +0100
parents 5694:7aec065d78a0 (diff) 5692:24e7e58155d8 (current diff)
children 5696:9fba74a28e0c
files
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/dataforms.lua	Wed Jun 05 00:05:03 2013 +0200
+++ b/util/dataforms.lua	Thu Jun 13 23:24:36 2013 +0100
@@ -187,7 +187,11 @@
 		for value in field_tag:childtags("value") do
 			result[#result+1] = value:get_text();
 		end
-		return result, (required and #result == 0 and "Required value missing" or nil);
+		if #result > 0 then
+			return result;
+		elseif required then
+			return nil, "Required value missing";
+		end
 	end
 
 field_readers["text-multi"] =