X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportSites.php;h=be6cc052b1ab76762c2ead8722d9cab580ca3ff9;hb=bc4417a522553d208767c7f42d70b42685c68051;hp=8845c60640c2706575fc03bb7eea0fee54f6ffaa;hpb=3c18e32e58d53ab38d1dd52d00f248ddef435ebd;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importSites.php b/maintenance/importSites.php index 8845c60640..be6cc052b1 100644 --- a/maintenance/importSites.php +++ b/maintenance/importSites.php @@ -30,8 +30,9 @@ class ImportSites extends Maintenance { public function execute() { $file = $this->getArg( 0 ); - $importer = new SiteImporter( SiteSQLStore::newInstance() ); - $importer->setExceptionCallback( array( $this, 'reportException' ) ); + $siteStore = \MediaWiki\MediaWikiServices::getInstance()->getSiteStore(); + $importer = new SiteImporter( $siteStore ); + $importer->setExceptionCallback( [ $this, 'reportException' ] ); $importer->importFromFile( $file ); @@ -49,5 +50,5 @@ class ImportSites extends Maintenance { } } -$maintClass = 'ImportSites'; +$maintClass = ImportSites::class; require_once RUN_MAINTENANCE_IF_MAIN;