00001 <?php
00012 require_once( "commandLine.inc" );
00013
00014 #require_once( "rebuildlinks.inc" );
00015 require_once( "refreshLinks.inc" );
00016 require_once( "rebuildtextindex.inc" );
00017 require_once( "rebuildrecentchanges.inc" );
00018
00019 $dbclass = 'Database' . ucfirst( $wgDBtype ) ;
00020 $database = new $dbclass( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
00021
00022 if ($wgDBtype == 'mysql') {
00023 print "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n";
00024 dropTextIndex( $database );
00025 rebuildTextIndex( $database );
00026 createTextIndex( $database );
00027 }
00028
00029 print "\n\n** Rebuilding recentchanges table:\n";
00030 rebuildRecentChangesTable();
00031
00032 # Doesn't work anymore
00033 # rebuildLinkTables();
00034
00035 # Use the slow incomplete one instead. It's designed to work in the background
00036 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";
00037 refreshLinks( 1 );
00038
00039 print "Done.\n";
00040 exit();
00041
00042