X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Frebuildall.php;h=30a5dd42b4c7334a10ac5595bbed18d106dd7974;hb=55c51f36a4869614d870dac5d870638ec58a95ff;hp=4ff873e9c6bf870d19d4c616300b05a87182de6e;hpb=23299ca8790bcf1aebcf54e0932b94338e630474;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildall.php b/maintenance/rebuildall.php index 4ff873e9c6..30a5dd42b4 100644 --- a/maintenance/rebuildall.php +++ b/maintenance/rebuildall.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class RebuildAll extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Rebuild links, text index and recent changes"; + $this->addDescription( 'Rebuild links, text index and recent changes' ); } public function getDbType() { @@ -41,27 +41,27 @@ class RebuildAll extends Maintenance { public function execute() { // Rebuild the text index - if ( $this->getDB( DB_SLAVE )->getType() != 'postgres' ) { + if ( $this->getDB( DB_REPLICA )->getType() != 'postgres' ) { $this->output( "** Rebuilding fulltext search index (if you abort " . "this will break searching; run this script again to fix):\n" ); - $rebuildText = $this->runChild( 'RebuildTextIndex', 'rebuildtextindex.php' ); + $rebuildText = $this->runChild( RebuildTextIndex::class, 'rebuildtextindex.php' ); $rebuildText->execute(); } // Rebuild RC $this->output( "\n\n** Rebuilding recentchanges table:\n" ); - $rebuildRC = $this->runChild( 'RebuildRecentchanges', 'rebuildrecentchanges.php' ); + $rebuildRC = $this->runChild( RebuildRecentchanges::class, 'rebuildrecentchanges.php' ); $rebuildRC->execute(); // Rebuild link tables $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" ); - $rebuildLinks = $this->runChild( 'RefreshLinks', 'refreshLinks.php' ); + $rebuildLinks = $this->runChild( RefreshLinks::class, 'refreshLinks.php' ); $rebuildLinks->execute(); $this->output( "Done.\n" ); } } -$maintClass = "RebuildAll"; +$maintClass = RebuildAll::class; require_once RUN_MAINTENANCE_IF_MAIN;