diff options
Diffstat (limited to 'apps/files/ajax/rawlist.php')
-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)); |