summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2010-11-09 14:52:31 +0000
committerTed Trask <ttrask01@yahoo.com>2010-11-09 14:52:31 +0000
commit6e237703b706ce9e217c2fdaebb968f3ca425444 (patch)
tree04f56972e2dc3308e9af71ca6596407895ef7688 /lib
parent39ca0e42d28efe74e2046fc282eed9b7bfe15cb0 (diff)
downloadacf-core-6e237703b706ce9e217c2fdaebb968f3ca425444.tar.bz2
acf-core-6e237703b706ce9e217c2fdaebb968f3ca425444.tar.xz
In displaying a form, after sorting by seq, further sort params by name alphabetically.
Diffstat (limited to 'lib')
-rw-r--r--lib/viewfunctions.lua2
1 files changed, 1 insertions, 1 deletions
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