X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportSites.php;h=be6cc052b1ab76762c2ead8722d9cab580ca3ff9;hb=11ee7f78da9776db26098642a151a288f98bea14;hp=daec7b62140032c1bd85e4e4f32fd9df09f91b7c;hpb=d42754e47722436ef52218f21a8e544a05ee9ad7;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importSites.php b/maintenance/importSites.php index daec7b6214..be6cc052b1 100644 --- a/maintenance/importSites.php +++ b/maintenance/importSites.php @@ -30,7 +30,8 @@ class ImportSites extends Maintenance { public function execute() { $file = $this->getArg( 0 ); - $importer = new SiteImporter( SiteSQLStore::newInstance() ); + $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;