MediaWiki  REL1_20
rebuildall.php
Go to the documentation of this file.
00001 <?php
00025 require_once( __DIR__ . '/Maintenance.php' );
00026 
00032 class RebuildAll extends Maintenance {
00033         public function __construct() {
00034                 parent::__construct();
00035                 $this->mDescription = "Rebuild links, text index and recent changes";
00036         }
00037 
00038         public function execute() {
00039                 // Rebuild the text index
00040                 if ( wfGetDB( DB_SLAVE )->getType() != 'postgres' ) {
00041                         $this->output( "** Rebuilding fulltext search index (if you abort this will break searching; run this script again to fix):\n" );
00042                         $rebuildText = $this->runChild( 'RebuildTextIndex', 'rebuildtextindex.php' );
00043                         $rebuildText->execute();
00044                 }
00045 
00046                 // Rebuild RC
00047                 $this->output( "\n\n** Rebuilding recentchanges table:\n" );
00048                 $rebuildRC = $this->runChild( 'RebuildRecentchanges', 'rebuildrecentchanges.php' );
00049                 $rebuildRC->execute();
00050 
00051                 // Rebuild link tables
00052                 $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" );
00053                 $rebuildLinks = $this->runChild( 'RefreshLinks', 'refreshLinks.php' );
00054                 $rebuildLinks->execute();
00055 
00056                 $this->output( "Done.\n" );
00057         }
00058 }
00059 
00060 $maintClass = "RebuildAll";
00061 require_once( RUN_MAINTENANCE_IF_MAIN );