X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupRemovedModules.php;h=863d74afb41779ec136b033d6e5da69a3152af8d;hb=55667f024df509a5be135a21a733ae4f0a55617a;hp=19949bc912998dd47a510a5ebf85172d344569a9;hpb=4dc3ac1c375b3d2eb6172dfef8fdebe71b8c5f43;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupRemovedModules.php b/maintenance/cleanupRemovedModules.php index 19949bc912..863d74afb4 100644 --- a/maintenance/cleanupRemovedModules.php +++ b/maintenance/cleanupRemovedModules.php @@ -22,6 +22,8 @@ * @author Roan Kattouw */ +use MediaWiki\MediaWikiServices; + require_once __DIR__ . '/Maintenance.php'; /** @@ -41,9 +43,9 @@ class CleanupRemovedModules extends Maintenance { public function execute() { $dbw = $this->getDB( DB_MASTER ); - $rl = new ResourceLoader( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) ); + $rl = new ResourceLoader( MediaWikiServices::getInstance()->getMainConfig() ); $moduleNames = $rl->getModuleNames(); - $moduleList = implode( ', ', array_map( array( $dbw, 'addQuotes' ), $moduleNames ) ); + $moduleList = implode( ', ', array_map( [ $dbw, 'addQuotes' ], $moduleNames ) ); $limit = max( 1, intval( $this->getOption( 'batchsize', 500 ) ) ); $this->output( "Cleaning up module_deps table...\n" );