MediaWiki  REL1_19
rebuildall.php
Go to the documentation of this file.
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                 // Rebuild the text index
00034                 if ( wfGetDB( DB_SLAVE )->getType() != 'postgres' ) {
00035                         $this->output( "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n" );
00036                         $rebuildText = $this->runChild( 'RebuildTextIndex', 'rebuildtextindex.php' );
00037                         $rebuildText->execute();
00038                 }
00039 
00040                 // Rebuild RC
00041                 $this->output( "\n\n** Rebuilding recentchanges table:\n" );
00042                 $rebuildRC = $this->runChild( 'RebuildRecentchanges', 'rebuildrecentchanges.php' );
00043                 $rebuildRC->execute();
00044 
00045                 // Rebuild link tables
00046                 $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" );
00047                 $rebuildLinks = $this->runChild( 'RefreshLinks', 'refreshLinks.php' );
00048                 $rebuildLinks->execute();
00049 
00050                 $this->output( "Done.\n" );
00051         }
00052 }
00053 
00054 $maintClass = "RebuildAll";
00055 require_once( RUN_MAINTENANCE_IF_MAIN );