diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-09-04 22:34:37 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-09-04 22:34:37 +0200 |
commit | 58b6f612a14a40fc14fffa363d6f272b36cd9f30 (patch) | |
tree | 30c57358390aaac0ffa7620ae9e63b31b6e70568 /inc/search.php | |
parent | 96b60e42fa2200c6ff54fd7b5f39d288288507f6 (diff) | |
download | rpg-58b6f612a14a40fc14fffa363d6f272b36cd9f30.tar.gz rpg-58b6f612a14a40fc14fffa363d6f272b36cd9f30.tar.bz2 |
minor fixes needed for searchindex plugin
darcs-hash:20050904203437-7ad00-e0856739efaff3eb63b6ef0821ac318b4f84af9e.gz
Diffstat (limited to 'inc/search.php')
-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 |