summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-09-25 12:22:11 +0200
committerAndreas Gohr <andi@splitbrain.org>2005-09-25 12:22:11 +0200
commit134f4ab222dddaf47588c908d0c2b81a3da2b76b (patch)
tree68f050bb36c0347d9ed7b9c4dd07df0c88a19121
parentae56bfb6216da28c214a2237e3ba7e9a5f1da37d (diff)
downloadrpg-134f4ab222dddaf47588c908d0c2b81a3da2b76b.tar.gz
rpg-134f4ab222dddaf47588c908d0c2b81a3da2b76b.tar.bz2
fix for backlinks
darcs-hash:20050925102211-7ad00-200edd676ba3956f03ec5bcc5149d4aa4bd15e24.gz
-rw-r--r--inc/fulltext.php5
1 files changed, 4 insertions, 1 deletions
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++) {