Skip to content
Snippets Groups Projects
Commit 85e41d95 authored by Christopher Schäpers's avatar Christopher Schäpers
Browse files

Sort files by name, not by mimetype

parent f84fe479
No related branches found
No related tags found
No related merge requests found
......@@ -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));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment