]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blob - maintenance/rebuildall.php
MediaWiki 1.11.0
[autoinstallsdev/mediawiki.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  * @todo document
6  * @addtogroup Maintenance
7  */
8
9 /** */
10 require_once( "commandLine.inc" );
11
12 #require_once( "rebuildlinks.inc" );
13 require_once( "refreshLinks.inc" );
14 require_once( "rebuildtextindex.inc" );
15 require_once( "rebuildrecentchanges.inc" );
16
17 $database = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
18
19 print "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n";
20 dropTextIndex( $database );
21 rebuildTextIndex( $database );
22 createTextIndex( $database );
23
24 print "\n\n** Rebuilding recentchanges table:\n";
25 rebuildRecentChangesTablePass1();
26 rebuildRecentChangesTablePass2();
27
28 # Doesn't work anymore
29 # rebuildLinkTables();
30
31 # Use the slow incomplete one instead. It's designed to work in the background
32 print "\n\n** Rebuilding links tables -- this can take a long time. It should be safe to abort via ctrl+C if you get bored.\n";
33 refreshLinks( 1 );
34
35 print "Done.\n";
36 exit();
37
38