Fix some of the rebuild scripts
[lhc/web/wiklou.git] / maintenance / rebuildall.php
1 <?php
2
3 # Rebuild link tracking tables from scratch. This takes several
4 # hours, depending on the database size and server configuration.
5
6 require_once( "commandLine.inc" );
7
8 #require_once( "rebuildlinks.inc" );
9 require_once( "refreshlinks.inc" );
10 require_once( "rebuildtextindex.inc" );
11 require_once( "rebuildrecentchanges.inc" );
12
13 $database = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
14
15 print "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n";
16 dropTextIndex( $database );
17 rebuildTextIndex( $database );
18 createTextIndex( $database );
19
20 print "\n\n** Rebuilding recentchanges table:\n";
21 rebuildRecentChangesTablePass1();
22 rebuildRecentChangesTablePass2();
23
24 # Doesn't work anymore
25 # rebuildLinkTables();
26
27 # Use the slow incomplete one instead. It's designed to work in the background
28 print "\n\n** Rebuilding links tables -- this can take a long time. It should be safe to about via ctrl+C if you get bored.\n";
29 refreshLinks( 1 );
30
31 print "Done.\n";
32 exit();
33
34 ?>