00001 <?php
00024 require_once( dirname(__FILE__) . '/Maintenance.php' );
00025
00026 class RebuildAll extends Maintenance {
00027 public function __construct() {
00028 parent::__construct();
00029 $this->mDescription = "Rebuild links, text index and recent changes";
00030 }
00031
00032 public function execute() {
00033 global $wgDBtype;
00034
00035 if ( $wgDBtype != 'postgres' ) {
00036 $this->output( "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n" );
00037 $rebuildText = $this->runChild( 'RebuildTextIndex', 'rebuildtextindex.php' );
00038 $rebuildText->execute();
00039 }
00040
00041
00042 $this->output( "\n\n** Rebuilding recentchanges table:\n" );
00043 $rebuildRC = $this->runChild( 'RebuildRecentchanges', 'rebuildrecentchanges.php' );
00044 $rebuildRC->execute();
00045
00046
00047 $this->output( "\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" );
00048 $rebuildLinks = $this->runChild( 'RefreshLinks', 'refreshLinks.php' );
00049 $rebuildLinks->execute();
00050
00051 $this->output( "Done.\n" );
00052 }
00053 }
00054
00055 $maintClass = "RebuildAll";
00056 require_once( DO_MAINTENANCE );