Skip to content

Commit

Permalink
detect corrupt title indexes FS#2076
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Oct 24, 2010
1 parent 24650a1 commit 4987233
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/fulltext.php
Expand Up @@ -241,6 +241,11 @@ function _ft_pageLookup(&$data){

$pages = array_map('rtrim', idx_getIndex('page', ''));
$titles = array_map('rtrim', idx_getIndex('title', ''));
// check for corrupt title index #FS2076
if(count($pages) != count($titles)){
$titles = array_fill(0,count($pages),'');
@unlink($conf['indexdir'].'/title.idx'); // will be rebuilt in inc/init.php
}
$pages = array_combine($pages, $titles);

$cleaned = cleanID($id);
Expand Down

0 comments on commit 4987233

Please sign in to comment.