From 58b6f612a14a40fc14fffa363d6f272b36cd9f30 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Sep 2005 22:34:37 +0200 Subject: minor fixes needed for searchindex plugin darcs-hash:20050904203437-7ad00-e0856739efaff3eb63b6ef0821ac318b4f84af9e.gz --- inc/search.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'inc') diff --git a/inc/search.php b/inc/search.php index ea20c4f3b..af7506f78 100644 --- a/inc/search.php +++ b/inc/search.php @@ -230,6 +230,21 @@ function search_pagename(&$data,$base,$file,$type,$lvl,$opts){ return true; } +/** + * Just lists all documents + * + * @author Andreas Gohr + */ +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 * -- cgit v1.2.3