summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2010-06-16 16:15:28 +0200
committerAdrian Lang <lang@cosmocode.de>2010-06-16 16:16:05 +0200
commita0070b52bbd24f6972b819fa8ff4bdbfe81b5bbc (patch)
tree08dd3143a5c47dd406e02c474ff72fb5b62d0bab /inc
parent159ef5962053a685e348239dfa0b3648ed516962 (diff)
downloadrpg-a0070b52bbd24f6972b819fa8ff4bdbfe81b5bbc.tar.gz
rpg-a0070b52bbd24f6972b819fa8ff4bdbfe81b5bbc.tar.bz2
Add title index to the indexer files, improve indexer calls
Diffstat (limited to 'inc')
-rw-r--r--inc/fulltext.php5
-rw-r--r--inc/init.php3
2 files changed, 4 insertions, 4 deletions
diff --git a/inc/fulltext.php b/inc/fulltext.php
index a68770277..b6aac5c91 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -233,9 +233,8 @@ function _ft_pageLookup(&$data){
$in_ns = !$data['not_in_ns'];
$in_title = !$data['not_in_title'];
- global $conf;
- $pages = array_map('rtrim', file($conf['indexdir'].'/page.idx'));
- $titles = array_map('rtrim', file($conf['indexdir'].'/title.idx'));
+ $pages = array_map('rtrim', idx_getIndex('page', ''));
+ $titles = array_map('rtrim', idx_getIndex('title', ''));
$pages = array_combine($pages, $titles);
if($id !== '' && cleanID($id) !== '') {
diff --git a/inc/init.php b/inc/init.php
index 3a9988fcf..20263f95a 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -304,7 +304,8 @@ function init_paths(){
function init_files(){
global $conf;
- $files = array( $conf['indexdir'].'/page.idx');
+ $files = array( $conf['indexdir'].'/page.idx',
+ $conf['indexdir'].'/title.idx');
foreach($files as $file){
if(!@file_exists($file)){