summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/search.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/search.php b/inc/search.php
index 5c70b0305..6590d7342 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -19,9 +19,10 @@ if(!defined('DOKU_INC')) die('meh.');
* @param callback $func Callback (function name or array with object,method)
* @param string $dir Current directory beyond $base
* @param int $lvl Recursion Level
+ * @param mixed $sort 'natural' to use natural order sorting (default); 'date' to sort by filemtime.
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function search(&$data,$base,$func,$opts,$dir='',$lvl=1,$sort=false){
+function search(&$data,$base,$func,$opts,$dir='',$lvl=1,$sort='natural'){
$dirs = array();
$files = array();
$filepaths = array();