diff options
author | kondou <kondou@ts.unde.re> | 2013-09-05 23:17:53 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-05 23:17:53 +0200 |
commit | 85e41d95005a60429681ad99f7ecb18698d0a1c3 (patch) | |
tree | 4cc1dca6f0607fd1c6df43e2d5bffbf93634db25 | |
parent | f84fe479a5af35cc51b4bee39492093c75ddc64e (diff) | |
download | nextcloud-server-85e41d95005a60429681ad99f7ecb18698d0a1c3.tar.gz nextcloud-server-85e41d95005a60429681ad99f7ecb18698d0a1c3.zip |
Sort files by name, not by mimetype
-rw-r--r-- | apps/files/ajax/rawlist.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php index 2fd6f67d308..e51932dff0f 100644 --- a/apps/files/ajax/rawlist.php +++ b/apps/files/ajax/rawlist.php @@ -42,4 +42,13 @@ if (is_array($mimetypes) && count($mimetypes)) { } } +// Sort by name +function cmp($a, $b) { + if ($a['name'] === $b['name']) { + return 0; + } + return ($a['name'] < $b['name']) ? -1 : 1; +} +uasort($files, 'cmp'); + OC_JSON::success(array('data' => $files)); |