X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportSites.php;h=be6cc052b1ab76762c2ead8722d9cab580ca3ff9;hb=107ee818cfd738db3bf1be86a52773e3e7760c0f;hp=8845c60640c2706575fc03bb7eea0fee54f6ffaa;hpb=7ed96f4de2411d21cce4572e1fac7d3a8d2d0b77;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;