summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/index.php')
-rw-r--r--apps/files_trashbin/index.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php
index 4f0a697939c..a4eb5cd216c 100644
--- a/apps/files_trashbin/index.php
+++ b/apps/files_trashbin/index.php
@@ -68,6 +68,18 @@ foreach ($result as $r) {
$files[] = $i;
}
+function fileCmp($a, $b) {
+ if ($a['type'] == 'dir' and $b['type'] != 'dir') {
+ return -1;
+ } elseif ($a['type'] != 'dir' and $b['type'] == 'dir') {
+ return 1;
+ } else {
+ return strnatcasecmp($a['name'], $b['name']);
+ }
+}
+
+usort($files, "fileCmp");
+
// Make breadcrumb
$breadcrumb = array(array('dir' => '', 'name' => 'Trash'));
$pathtohere = '';