summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2010-08-29 14:13:47 +0200
committerAndreas Gohr <andi@splitbrain.org>2010-08-29 14:13:47 +0200
commit5479a8c3341247ca228026819f20f3ab5c34a80f (patch)
treec8d0f78c2f47f373473419396d3c0855ec671eca
parent2d80806237992142db35857e6190709d86fa531d (diff)
downloadrpg-5479a8c3341247ca228026819f20f3ab5c34a80f.tar.gz
rpg-5479a8c3341247ca228026819f20f3ab5c34a80f.tar.bz2
fixed page lookup when useheading is disabled
this was broken by d0bdf7659fce98c2922b151766d51d5c7e8814d6
-rw-r--r--inc/fulltext.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/fulltext.php b/inc/fulltext.php
index cac2de4a4..e90205e9c 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -243,11 +243,11 @@ function _ft_pageLookup(&$data){
$titles = array_map('rtrim', idx_getIndex('title', ''));
$pages = array_combine($pages, $titles);
- if ($id !== '' && cleanID($id) !== '') {
- $cleaned = cleanID($id);
+ $cleaned = cleanID($id);
+ if ($id !== '' && $cleaned !== '') {
foreach ($pages as $p_id => $p_title) {
if ((strpos($in_ns ? $p_id : noNSorNS($p_id), $cleaned) === false) &&
- ($in_title && stripos($p_title, $id) === false)) {
+ (!$in_title || (stripos($p_title, $id) === false)) ) {
unset($pages[$p_id]);
}
}