Skip to content

Commit 58b943f

Browse files
joewizadamretter
authored andcommitted
Sort database resources alphabetically
1 parent 99f73ff commit 58b943f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/xar-resources/modules/explorer.xqm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ function exp:describe-collection($uri) as map(xs:string, xs:string) {
3535
exp:collection-properties($uri),
3636
map {
3737
"collections": array {
38-
xmldb:get-child-collections($uri) ! exp:collection-properties($uri || "/" || .)
38+
(xmldb:get-child-collections($uri) => sort()) ! exp:collection-properties($uri || "/" || .)
3939

4040
},
4141
"documents": array {
42-
xmldb:get-child-resources($uri) ! exp:describe-document($uri || "/" || .)
42+
(xmldb:get-child-resources($uri) => sort()) ! exp:describe-document($uri || "/" || .)
4343
}
4444
}
4545
))

0 commit comments

Comments
 (0)