diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/search.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/inc/search.php b/inc/search.php index ea20c4f3b..af7506f78 100644 --- a/inc/search.php +++ b/inc/search.php @@ -231,6 +231,21 @@ function search_pagename(&$data,$base,$file,$type,$lvl,$opts){ } /** + * Just lists all documents + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +function search_allpages(&$data,$base,$file,$type,$lvl,$opts){ + //we do nothing with directories + if($type == 'd') return true; + //only search txt files + if(!preg_match('#\.txt$#',$file)) return true; + + $data[]['id'] = pathID($file); + return true; +} + +/** * Search for backlinks to a given page * * $opts['ns'] namespace of the page |