diff options
author | Andreas Gohr <andi@splitbrain.org> | 2010-10-24 10:08:30 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2010-10-24 10:08:30 +0200 |
commit | 4987233dfc97c0b3bdfa620a25fc3ee5775f42a5 (patch) | |
tree | f2853e9fd4042ff8340766ba1da1465bb7015e69 | |
parent | 24650a1909022a24959489f1508fd877ce6db576 (diff) | |
download | rpg-4987233dfc97c0b3bdfa620a25fc3ee5775f42a5.tar.gz rpg-4987233dfc97c0b3bdfa620a25fc3ee5775f42a5.tar.bz2 |
detect corrupt title indexes FS#2076
-rw-r--r-- | inc/fulltext.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/inc/fulltext.php b/inc/fulltext.php index 943a5d401..8cdfac42e 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -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); |