Trash: use the same sorting algoritm as files
This commit is contained in:
parent
9d74ce4595
commit
697536cf6a
|
@ -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…
Reference in New Issue