summaryrefslogtreecommitdiff
path: root/inc/search.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-01-27 20:32:41 +0000
committerChristopher Smith <chris@jalakai.co.uk>2013-01-27 20:32:41 +0000
commit155e63c930bf2fdc260994a62baa80fe5f5ab764 (patch)
tree9fa5715c1c0241c85070e4fa8b10103b88c3324d /inc/search.php
parentfe82d751808e4f0ede157e22e6c1e4b7402e2022 (diff)
downloadrpg-155e63c930bf2fdc260994a62baa80fe5f5ab764.tar.gz
rpg-155e63c930bf2fdc260994a62baa80fe5f5ab764.tar.bz2
add documentation for sort parameter, change false to 'natural'
Diffstat (limited to 'inc/search.php')
-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();