diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-09-21 21:51:18 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-09-21 21:51:18 +0200 |
commit | 3cbaa9a4ac8aae40957eda92e4cf6885524c183a (patch) | |
tree | df7e3dc1e2c8f7e3301d88a3c54204ccec51f0e3 /inc/fulltext.php | |
parent | 993efcf6a9ea92bcea4e4964ea0225aa164a73d6 (diff) | |
download | rpg-3cbaa9a4ac8aae40957eda92e4cf6885524c183a.tar.gz rpg-3cbaa9a4ac8aae40957eda92e4cf6885524c183a.tar.bz2 |
backlinkfix for pages with special characters #548
darcs-hash:20050921195118-7ad00-9070166cbaa26e3f27f7b92382346a70f5c479a1.gz
Diffstat (limited to 'inc/fulltext.php')
-rw-r--r-- | inc/fulltext.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/inc/fulltext.php b/inc/fulltext.php index 3940bc0c4..22e28845c 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -97,14 +97,15 @@ function ft_backlinks($id){ // quick lookup of the pagename $page = noNS($id); - $matches = idx_lookup(array($page)); + $sw = array(); // we don't use stopwords here + $matches = idx_lookup(idx_tokenizer($page,$sw)); //pagename may contain specials (_ or .) + $docs = ft_resultCombine(array_values($matches)); - if(!count($matches)) return $result; + if(!count($docs)) return $result; require_once(DOKU_INC.'inc/parserutils.php'); - // check instructions for matching links - foreach(array_keys($matches[$page]) as $match){ + foreach(array_keys($docs) as $match){ $instructions = p_cached_instructions(wikiFN($match),true); if(is_null($instructions)) continue; |