summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2011-06-19 00:51:42 +0200
committerMichael Hamann <michael@content-space.de>2011-06-19 00:53:06 +0200
commit4b93850916b217e4bf2ede3ba5e5457e1916e9e7 (patch)
tree5ddb7695d434d7f5bb5137f573d9334b84280903 /bin
parent571b9b92283065f5bb5dd91a417b89b047efcc6b (diff)
downloadrpg-4b93850916b217e4bf2ede3ba5e5457e1916e9e7.tar.gz
rpg-4b93850916b217e4bf2ede3ba5e5457e1916e9e7.tar.bz2
Properly clean up the whole index in bin/indexer.php
There were some index files that haven't been cleaned up, now also the files of the metadata index are cleaned/removed when a clean is requested.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/indexer.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/indexer.php b/bin/indexer.php
index 4bfd1682e..f6aeb4f0e 100755
--- a/bin/indexer.php
+++ b/bin/indexer.php
@@ -133,12 +133,15 @@ function _clearindex(){
_lock();
_quietecho("Clearing index... ");
io_saveFile($conf['indexdir'].'/page.idx','');
- //io_saveFile($conf['indexdir'].'/title.idx','');
+ io_saveFile($conf['indexdir'].'/title.idx','');
+ io_saveFile($conf['indexdir'].'/pageword.idx','');
+ io_saveFile($conf['indexdir'].'/metadata.idx','');
$dir = @opendir($conf['indexdir']);
if($dir!==false){
while(($f = readdir($dir)) !== false){
if(substr($f,-4)=='.idx' &&
- (substr($f,0,1)=='i' || substr($f,0,1)=='w'))
+ (substr($f,0,1)=='i' || substr($f,0,1)=='w'
+ || substr($f,-6)=='_w.idx' || substr($f,-6)=='_i.idx' || substr($f,-6)=='_p.idx'))
@unlink($conf['indexdir']."/$f");
}
}