Skip to content
Snippets Groups Projects
Commit 1dc5d48b authored by Christopher Smith's avatar Christopher Smith
Browse files

change to use natural order sorting

parent 5514a5a7
No related branches found
No related tags found
No related merge requests found
......@@ -42,10 +42,10 @@ function search(&$data,$base,$func,$opts,$dir='',$lvl=1,$sort='natural'){
closedir($dh);
if ($sort == 'date') {
@array_multisort(array_map('filemtime', $filepaths), SORT_NUMERIC, SORT_DESC, $files);
} else {
sort($files);
} else /* natural */ {
natsort($files);
}
sort($dirs);
natsort($dirs);
//give directories to userfunction then recurse
foreach($dirs as $dir){
......
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