diff options
-rw-r--r-- | inc/fulltext.php | 3 | ||||
-rw-r--r-- | inc/indexer.php | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/inc/fulltext.php b/inc/fulltext.php index 891558f96..8155325ee 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -234,7 +234,8 @@ function _ft_pageLookup(&$data){ } } if ($in_title) { - foreach ($Indexer->lookupKey('title', "*$id*") as $p_id) { + $wildcard_id = "*$id*"; + foreach ($Indexer->lookupKey('title', $wildcard_id) as $p_id) { if (!isset($pages[$p_id])) $pages[$p_id] = p_get_first_heading($p_id, false); } diff --git a/inc/indexer.php b/inc/indexer.php index 5aa321d46..eaab7736a 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -566,7 +566,12 @@ class Doku_Indexer { unset($words); // free the used memory + // initialize the result so it won't be null $result = array(); + foreach ($value_array as $val) { + $result[$val] = array(); + } + $page_idx = $this->_getIndex('page', ''); // Special handling for titles |