From 134f4ab222dddaf47588c908d0c2b81a3da2b76b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 25 Sep 2005 12:22:11 +0200 Subject: fix for backlinks darcs-hash:20050925102211-7ad00-200edd676ba3956f03ec5bcc5149d4aa4bd15e24.gz --- inc/fulltext.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/fulltext.php b/inc/fulltext.php index 22e28845c..96f3ad53c 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -100,7 +100,6 @@ function ft_backlinks($id){ $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($docs)) return $result; require_once(DOKU_INC.'inc/parserutils.php'); @@ -216,6 +215,10 @@ function ft_snippet($id,$poswords){ */ function ft_resultCombine($args){ $array_count = count($args); + if($array_count == 1){ + return $args[0]; + } + $result = array(); foreach ($args[0] as $key1 => $value1) { for ($i = 1; $i !== $array_count; $i++) { -- cgit v1.2.3