Trash: use the same sorting algoritm as files

remotes/origin/stable5
Robin Appelman 12 years ago
parent 9d74ce4595
commit 697536cf6a
  1. 12
      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 = '';

Loading…
Cancel
Save