From a0070b52bbd24f6972b819fa8ff4bdbfe81b5bbc Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Wed, 16 Jun 2010 16:15:28 +0200 Subject: Add title index to the indexer files, improve indexer calls --- inc/fulltext.php | 5 ++--- inc/init.php | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'inc') 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)){ -- cgit v1.2.3