summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-01-27 20:33:38 +0000
committerChristopher Smith <chris@jalakai.co.uk>2013-01-27 20:33:38 +0000
commit1dc5d48b104c5676df02e6bf0090e13b0e26508b (patch)
tree0982caea65a88a4cb02ac704fda8719b75f1c8f6
parent5514a5a77e2d38cf763ed922b727ab305c8c8bb9 (diff)
downloadrpg-1dc5d48b104c5676df02e6bf0090e13b0e26508b.tar.gz
rpg-1dc5d48b104c5676df02e6bf0090e13b0e26508b.tar.bz2
change to use natural order sorting
-rw-r--r--inc/search.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/search.php b/inc/search.php
index 6fd7e9ae6..277b17d39 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -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){