bbc5327d3bc2e39c89eeef3ef947327d33e54f85
[lhc/web/wiklou.git] / maintenance / rebuildtextindex.php
1 <?
2
3 # Rebuild link tracking tables from scratch. This takes several
4 # hours, depending on the database size and server configuration.
5
6 if ( ! is_readable( "../LocalSettings.php" ) ) {
7 print "A copy of your installation's LocalSettings.php\n" .
8 "must exist in the source directory.\n";
9 exit();
10 }
11
12 $DP = "../includes";
13 include_once( "../LocalSettings.php" );
14 include_once( "../AdminSettings.php" );
15
16 include_once( "{$IP}/Setup.php" );
17 include_once( "./rebuildtextindex.inc" );
18 $wgTitle = Title::newFromText( "Rebuild text index script" );
19 set_time_limit(0);
20
21 $wgDBuser = $wgDBadminuser;
22 $wgDBpassword = $wgDBadminpassword;
23
24 dropTextIndex();
25 rebuildTextIndex();
26 createTextIndex();
27
28 print "Done.\n";
29 exit();
30
31 ?>