From 6e237703b706ce9e217c2fdaebb968f3ca425444 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 9 Nov 2010 14:52:31 +0000 Subject: In displaying a form, after sorting by seq, further sort params by name alphabetically. --- lib/viewfunctions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/viewfunctions.lua') diff --git a/lib/viewfunctions.lua b/lib/viewfunctions.lua index 833d5b4..bcb8a2c 100644 --- a/lib/viewfunctions.lua +++ b/lib/viewfunctions.lua @@ -128,7 +128,7 @@ function displayformcontents(myform, order, finishingorder, header_level, group) end end if #tmporder>0 then - table.sort(tmporder, function(a,b) return a.seq < b.seq end) + table.sort(tmporder, function(a,b) if a.seq ~= b.seq then return a.seq < b.seq else return a.name < b.name end end) order = {} for i,val in ipairs(tmporder) do order[#order+1] = val.name -- cgit v1.2.3