From 34f576f540e36eec70c997a7f29fafea9c0e24e1 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 25 Dec 2017 16:25:04 -0800 Subject: sort cloud directory by 1. is_dir and 2. name until we can figure out a way to request different sort orders --- Zotlabs/Storage/Directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage/Directory.php') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index 63ff4341c..510d463c1 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -691,7 +691,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo } $prefix = ''; - $suffix = ''; + $suffix = ' order by is_dir desc, filename asc '; $r = q("select $prefix id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, created, edited from attach where folder = '%s' and uid = %d $perms $suffix", dbesc($folder), -- cgit v1.2.3